From 86dcab9ce7318e2063f627680eed2b09159a3ffe Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Tue, 25 Feb 2020 13:11:36 +0100
Subject: [PATCH] make sure we're actually looking at a boolean comparison

---
 modules/base/tests/test_string_ref.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/base/tests/test_string_ref.cc b/modules/base/tests/test_string_ref.cc
index ea6b8d0cb..6b75fd0f6 100644
--- a/modules/base/tests/test_string_ref.cc
+++ b/modules/base/tests/test_string_ref.cc
@@ -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();
-- 
GitLab