Skip to content
Snippets Groups Projects
Commit 86dcab9c authored by Studer Gabriel's avatar Studer Gabriel
Browse files

make sure we're actually looking at a boolean comparison

parent 7ca52518
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(test_string_ref)
// to_int
std::pair<bool, int> r=sr.to_int();
BOOST_CHECK(r.first==true);
BOOST_CHECK(r.second=12345);
BOOST_CHECK(r.second==12345);
r=StringRef("x", 1).to_int();
BOOST_CHECK(r.first==false);
r=StringRef("12.34", 5).to_int();
......@@ -89,10 +89,10 @@ BOOST_AUTO_TEST_CASE(test_string_ref)
// to_float
std::pair<bool, Real> r2=StringRef("1", 1).to_float();
BOOST_CHECK(r2.first==true);
BOOST_CHECK(r2.second=1.0);
BOOST_CHECK(r2.second==1.0);
r2=StringRef("1.5", 3).to_float();
BOOST_CHECK(r2.first==true);
BOOST_CHECK(r2.second=1.5);
BOOST_CHECK(r2.second==1.5);
r2=StringRef("x", 1).to_float();
BOOST_CHECK(r2.first==false);
r2=StringRef("12.3.4", 6).to_float();
......@@ -103,10 +103,10 @@ BOOST_AUTO_TEST_CASE(test_string_ref)
// to_float_with_exp
std::pair<bool, Real> r3=StringRef("1", 1).to_float();
BOOST_CHECK(r3.first==true);
BOOST_CHECK(r3.second=1.0);
BOOST_CHECK(r3.second==1.0);
r3=StringRef("1.5", 3).to_float();
BOOST_CHECK(r3.first==true);
BOOST_CHECK(r3.second=1.5);
BOOST_CHECK(r3.second==1.5);
r3=StringRef("x", 1).to_float();
BOOST_CHECK(r3.first==false);
r3=StringRef("12.3.4", 6).to_float();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment