summaryrefslogtreecommitdiff
path: root/tests/monster_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/monster_test.cpp')
-rw-r--r--tests/monster_test.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/monster_test.cpp b/tests/monster_test.cpp
index ed6d55bf..2ca3277a 100644
--- a/tests/monster_test.cpp
+++ b/tests/monster_test.cpp
@@ -626,7 +626,7 @@ void TestMonsterExtraFloats(const std::string &tests_data_path) {
TEST_EQ(def_extra->d3(), -infinity_d);
std::string jsongen;
auto result = GenerateText(parser, def_obj, &jsongen);
- TEST_EQ(result, true);
+ TEST_NULL(result);
// Check expected default values.
TEST_EQ(std::string::npos != jsongen.find("f0: nan"), true);
TEST_EQ(std::string::npos != jsongen.find("f1: nan"), true);
@@ -777,7 +777,7 @@ void ParseAndGenerateTextTest(const std::string &tests_data_path, bool binary) {
std::string jsongen;
auto result =
GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen);
- TEST_EQ(result, true);
+ TEST_NULL(result);
TEST_EQ_STR(jsongen.c_str(), jsonfile.c_str());
// We can also do the above using the convenient Registry that knows about
@@ -815,9 +815,8 @@ void ParseAndGenerateTextTest(const std::string &tests_data_path, bool binary) {
// request natural printing for utf-8 strings
parser.opts.natural_utf8 = true;
parser.opts.strict_json = true;
- TEST_EQ(
- GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen_utf8),
- true);
+ TEST_NULL(
+ GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen_utf8));
TEST_EQ_STR(jsongen_utf8.c_str(), jsonfile_utf8.c_str());
}