diff options
author | Stephen Morris <stephen@isc.org> | 2013-07-25 17:11:34 +0200 |
---|---|---|
committer | Stephen Morris <stephen@isc.org> | 2013-07-25 17:11:34 +0200 |
commit | a6cd22451be6684f4bebbc34d5344371afdeaa4b (patch) | |
tree | 34718dfc7ac1e2a926026bed510c530d09cde1fd /src/bin/dhcp4/tests/marker_file.cc | |
parent | [2981] Added libreload functionality to DHCPv6 server (diff) | |
download | kea-a6cd22451be6684f4bebbc34d5344371afdeaa4b.tar.xz kea-a6cd22451be6684f4bebbc34d5344371afdeaa4b.zip |
[2981] Final modifications before review
Diffstat (limited to 'src/bin/dhcp4/tests/marker_file.cc')
-rw-r--r-- | src/bin/dhcp4/tests/marker_file.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/bin/dhcp4/tests/marker_file.cc b/src/bin/dhcp4/tests/marker_file.cc index d05ff60cb5..d1c4aba1c5 100644 --- a/src/bin/dhcp4/tests/marker_file.cc +++ b/src/bin/dhcp4/tests/marker_file.cc @@ -34,22 +34,10 @@ checkMarkerFile(const char* name, const char* expected) { // Is it open? if (!file.is_open()) { - - // No. This is OK if we don't expected is to be present but is - // a failure otherwise. - if (expected == NULL) { - return (true); - } ADD_FAILURE() << "Unable to open " << name << ". It was expected " << "to be present and to contain the string '" << expected << "'"; return (false); - } else if (expected == NULL) { - - // File is open but we don't expect it to be present. - ADD_FAILURE() << "Opened " << name << " but it is not expected to " - << "be present."; - return (false); } // OK, is open, so read the data and see what we have. Compare it @@ -58,7 +46,8 @@ checkMarkerFile(const char* name, const char* expected) { getline(file, content); string expected_str(expected); - EXPECT_EQ(expected_str, content) << "Data was read from " << name; + EXPECT_EQ(expected_str, content) << "Marker file " << name + << "did not contain the expected data"; file.close(); return (expected_str == content); |