Lines Matching refs:jsongen
621 std::string jsongen; in JsonDefaultTest() local
622 auto result = GenerateText(parser, builder.GetBufferPointer(), &jsongen); in JsonDefaultTest()
625 TEST_EQ(std::string::npos != jsongen.find("color: \"Blue\""), true); in JsonDefaultTest()
627 TEST_EQ(std::string::npos != jsongen.find("testf: 3.14159"), true); in JsonDefaultTest()
650 std::string jsongen; in JsonEnumsTest() local
651 auto result = GenerateText(parser, builder.GetBufferPointer(), &jsongen); in JsonEnumsTest()
653 TEST_EQ(std::string::npos != jsongen.find("color: \"Red Blue\""), true); in JsonEnumsTest()
725 std::string jsongen; in TestMonsterExtraFloats() local
726 auto result = GenerateText(parser, def_obj, &jsongen); in TestMonsterExtraFloats()
729 TEST_EQ(std::string::npos != jsongen.find("f0: nan"), true); in TestMonsterExtraFloats()
730 TEST_EQ(std::string::npos != jsongen.find("f1: nan"), true); in TestMonsterExtraFloats()
731 TEST_EQ(std::string::npos != jsongen.find("f2: inf"), true); in TestMonsterExtraFloats()
732 TEST_EQ(std::string::npos != jsongen.find("f3: -inf"), true); in TestMonsterExtraFloats()
733 TEST_EQ(std::string::npos != jsongen.find("d0: nan"), true); in TestMonsterExtraFloats()
734 TEST_EQ(std::string::npos != jsongen.find("d1: nan"), true); in TestMonsterExtraFloats()
735 TEST_EQ(std::string::npos != jsongen.find("d2: inf"), true); in TestMonsterExtraFloats()
736 TEST_EQ(std::string::npos != jsongen.find("d3: -inf"), true); in TestMonsterExtraFloats()
739 jsongen = ""; in TestMonsterExtraFloats()
740 TEST_EQ(LoadFile((extra_base + ".json").c_str(), false, &jsongen), true); in TestMonsterExtraFloats()
741 TEST_EQ(parser.Parse(jsongen.c_str()), true); in TestMonsterExtraFloats()
822 std::string jsongen; in ParseAndGenerateTextTest() local
824 GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen); in ParseAndGenerateTextTest()
826 TEST_EQ_STR(jsongen.c_str(), jsonfile.c_str()); in ParseAndGenerateTextTest()
1509 std::string jsongen; in FuzzTest2() local
1512 GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen); in FuzzTest2()
1515 if (jsongen != json) { in FuzzTest2()
1518 size_t len = std::min(json.length(), jsongen.length()); in FuzzTest2()
1520 if (json[i] != jsongen[i]) { in FuzzTest2()
1525 static_cast<int>(i), jsongen[i], json[i]); in FuzzTest2()
2087 std::string jsongen; in GenerateTableTextTest() local
2089 &jsongen); in GenerateTableTextTest()
2093 jsongen.clear(); in GenerateTableTextTest()
2094 result = GenerateTextFromTable(parser, pos, "MyGame.Example.Vec3", &jsongen); in GenerateTableTextTest()
2097 jsongen.c_str(), in GenerateTableTextTest()
2100 jsongen.clear(); in GenerateTableTextTest()
2102 GenerateTextFromTable(parser, &test3, "MyGame.Example.Test", &jsongen); in GenerateTableTextTest()
2104 TEST_EQ_STR(jsongen.c_str(), "{a: 5,b: 6}"); in GenerateTableTextTest()
2106 jsongen.clear(); in GenerateTableTextTest()
2108 GenerateTextFromTable(parser, test4, "MyGame.Example.Test", &jsongen); in GenerateTableTextTest()
2110 TEST_EQ_STR(jsongen.c_str(), "{a: 10,b: 20}"); in GenerateTableTextTest()
2173 std::string jsongen; in UnicodeTest() local
2176 GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen); in UnicodeTest()
2178 TEST_EQ_STR(jsongen.c_str(), in UnicodeTest()
2193 std::string jsongen; in UnicodeTestAllowNonUTF8() local
2196 GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen); in UnicodeTestAllowNonUTF8()
2199 jsongen.c_str(), in UnicodeTestAllowNonUTF8()
2216 std::string jsongen; in UnicodeTestGenerateTextFailsOnNonUTF8() local
2222 GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen); in UnicodeTestGenerateTextFailsOnNonUTF8()
2403 std::string jsongen; in UnknownFieldsTest() local
2406 GenerateText(parser, parser.builder_.GetBufferPointer(), &jsongen); in UnknownFieldsTest()
2408 TEST_EQ_STR(jsongen.c_str(), "{str: \"test\",i: 10}"); in UnknownFieldsTest()
2663 std::string jsongen; in UnionVectorTest() local
2664 auto result = GenerateText(parser, fbb.GetBufferPointer(), &jsongen); in UnionVectorTest()
2666 TEST_EQ_STR(jsongen.c_str(), in UnionVectorTest()