From eec0f612988534ae48db0aed90ec5fdfe36b8ca9 Mon Sep 17 00:00:00 2001 From: Jyrki Vesterinen Date: Mon, 23 Oct 2017 20:04:21 +0300 Subject: [PATCH] Revert config unit tests to compare attributes to empty strings again Reverts a change in commit 2eacb4e1c3c9a14d85aa1602ddc6b248441ed7fa. 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). --- src/tests/test_config.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/test_config.cpp b/src/tests/test_config.cpp index 417345a7120b1..fa1e2fd51e9a8 100644 --- a/src/tests/test_config.cpp +++ b/src/tests/test_config.cpp @@ -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());