Skip to content

Commit

Permalink
Revert config unit tests to compare attributes to empty strings again
Browse files Browse the repository at this point in the history
Reverts a change in commit 2eacb4e.

The comparison in this unit test compared an *attribute* to an empty
string, not a *string*. Furthermore, the entire point of the test was
to verify that an empty attribute doesn't compare equal to the empty
string. In its old form, the test was just wrong (and failing).
  • Loading branch information
jyrkive authored and GregoryLundberg committed Nov 30, 2017
1 parent d11812b commit eec0f61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tests/test_config.cpp
Expand Up @@ -149,13 +149,13 @@ BOOST_AUTO_TEST_CASE ( test_config_attribute_value )
x_str = c["x"].str();
BOOST_CHECK_EQUAL(x_str, "123456789123");

// blank != "" test.
// blank != "" test.
c.clear();
BOOST_CHECK(!cc["x"].empty());
BOOST_CHECK(cc["x"] != "");
BOOST_CHECK(cc["x"].empty());
BOOST_CHECK(cc["x"].blank());

BOOST_CHECK(!c["x"].empty());
BOOST_CHECK(c["x"] != "");
BOOST_CHECK(c["x"].empty());
BOOST_CHECK(c["x"].blank());

Expand Down

0 comments on commit eec0f61

Please sign in to comment.