changeset 1966:8c506670f3cd

fix unit tests for recent JsonCpp releases
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 11 Apr 2016 11:41:51 +0200
parents 877713b3a91c
children 83a2431a455f
files UnitTestsSources/LuaTests.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/UnitTestsSources/LuaTests.cpp	Mon Apr 11 10:27:15 2016 +0200
+++ b/UnitTestsSources/LuaTests.cpp	Mon Apr 11 11:41:51 2016 +0200
@@ -259,9 +259,9 @@
     ASSERT_EQ(Json::stringValue, v["List"][0]["a"].type());
     ASSERT_EQ(Json::stringValue, v["List"][0]["b"].type());
     ASSERT_EQ(Json::stringValue, v["List"][0]["c"].type());
-    ASSERT_EQ("42", v["List"][0]["a"].asString());
-    ASSERT_EQ("44.37", v["List"][0]["b"].asString());
-    ASSERT_EQ("-43", v["List"][0]["c"].asString());
+    ASSERT_FLOAT_EQ(42.0f, boost::lexical_cast<float>(v["List"][0]["a"].asString()));
+    ASSERT_FLOAT_EQ(44.37f, boost::lexical_cast<float>(v["List"][0]["b"].asString()));
+    ASSERT_FLOAT_EQ(-43.0f, boost::lexical_cast<float>(v["List"][0]["c"].asString()));
     ASSERT_EQ("test3", v["List"][1][0].asString());
     ASSERT_EQ("test1", v["List"][1][1].asString());
     ASSERT_EQ("test2", v["List"][1][2].asString());