• Home
  • Raw
  • Download

Lines Matching refs:TEST_EQ

211   TEST_EQ(VerifyMonsterBuffer(verifier), true);  in AccessFlatBufferTest()
221 TEST_EQ(VerifyMonsterBuffer(verifier1), true); in AccessFlatBufferTest()
222 TEST_EQ(verifier1.GetComputedSize(), length); in AccessFlatBufferTest()
225 TEST_EQ(VerifyMonsterBuffer(verifier2), true); in AccessFlatBufferTest()
226 TEST_EQ(verifier2.GetComputedSize(), length); in AccessFlatBufferTest()
230 TEST_EQ(strcmp(MonsterIdentifier(), "MONS"), 0); in AccessFlatBufferTest()
231 TEST_EQ(MonsterBufferHasIdentifier(flatbuf), true); in AccessFlatBufferTest()
232 TEST_EQ(strcmp(MonsterExtension(), "mon"), 0); in AccessFlatBufferTest()
237 TEST_EQ(monster->hp(), 80); in AccessFlatBufferTest()
238 TEST_EQ(monster->mana(), 150); // default in AccessFlatBufferTest()
246 TEST_EQ(pos->z(), 3); in AccessFlatBufferTest()
247 TEST_EQ(pos->test3().a(), 10); in AccessFlatBufferTest()
248 TEST_EQ(pos->test3().b(), 20); in AccessFlatBufferTest()
251 TEST_EQ(VectorLength(inventory), 10UL); // Works even if inventory is null. in AccessFlatBufferTest()
258 TEST_EQ(*it, inv_vec.at(indx)); // Use bounds-check. in AccessFlatBufferTest()
259 TEST_EQ(*it, inv_data[indx]); in AccessFlatBufferTest()
264 TEST_EQ(*it, inv_vec.at(indx)); // Use bounds-check. in AccessFlatBufferTest()
265 TEST_EQ(*it, inv_data[indx]); in AccessFlatBufferTest()
270 TEST_EQ(*it, inv_vec.at(indx)); // Use bounds-check. in AccessFlatBufferTest()
271 TEST_EQ(*it, inv_data[indx]); in AccessFlatBufferTest()
276 TEST_EQ(*it, inv_vec.at(indx)); // Use bounds-check. in AccessFlatBufferTest()
277 TEST_EQ(*it, inv_data[indx]); in AccessFlatBufferTest()
280 TEST_EQ(monster->color(), Color_Blue); in AccessFlatBufferTest()
283 TEST_EQ(monster->test_type(), Any_Monster); // First make sure which it is. in AccessFlatBufferTest()
290 TEST_EQ(vecofstrings->size(), 4U); in AccessFlatBufferTest()
295 TEST_EQ(vecofstrings->Get(0)->c_str(), vecofstrings->Get(2)->c_str()); in AccessFlatBufferTest()
296 TEST_EQ(vecofstrings->Get(1)->c_str(), vecofstrings->Get(3)->c_str()); in AccessFlatBufferTest()
301 TEST_EQ(vecofstrings2->size(), 2U); in AccessFlatBufferTest()
308 TEST_EQ(vecoftables->size(), 3U); in AccessFlatBufferTest()
310 TEST_EQ(strlen(it->name()->c_str()) >= 4, true); in AccessFlatBufferTest()
312 TEST_EQ(vecoftables->Get(0)->hp(), 1000); in AccessFlatBufferTest()
325 TEST_EQ(true, (left->KeyCompareLessThan(right))); in AccessFlatBufferTest()
328 TEST_EQ(static_cast<const Ability *>(nullptr), in AccessFlatBufferTest()
345 TEST_EQ(flex->size(), 4); // Encoded FlexBuffer bytes. in AccessFlatBufferTest()
348 TEST_EQ(monster->flex_flexbuffer_root().AsInt16(), 1234); in AccessFlatBufferTest()
353 TEST_EQ(colors->size(), 2); in AccessFlatBufferTest()
354 TEST_EQ(colors->Get(0), Color_Blue); in AccessFlatBufferTest()
355 TEST_EQ(colors->Get(1), Color_Green); in AccessFlatBufferTest()
361 TEST_EQ(flatbuffers::AlignOf<Test>(), 2UL); in AccessFlatBufferTest()
362 TEST_EQ(sizeof(Test), 4UL); in AccessFlatBufferTest()
373 TEST_EQ(test_0->a(), 10); in AccessFlatBufferTest()
374 TEST_EQ(test_0->b(), 20); in AccessFlatBufferTest()
375 TEST_EQ(test_1->a(), 30); in AccessFlatBufferTest()
376 TEST_EQ(test_1->b(), 40); in AccessFlatBufferTest()
378 TEST_EQ(it->a() == 10 || it->a() == 30, true); // Just testing iterators. in AccessFlatBufferTest()
383 TEST_EQ(flatbuffers::IsFieldPresent(monster, Monster::VT_HP), true); in AccessFlatBufferTest()
384 TEST_EQ(flatbuffers::IsFieldPresent(monster, Monster::VT_MANA), false); in AccessFlatBufferTest()
387 TEST_EQ(GetBufferStartFromRootPointer(monster), flatbuf); in AccessFlatBufferTest()
398 TEST_EQ(hp_ok, true); // Field was present. in MutateFlatBuffersTest()
399 TEST_EQ(monster->hp(), 10); in MutateFlatBuffersTest()
402 TEST_EQ(hp_ok_default, true); // Field was present. in MutateFlatBuffersTest()
403 TEST_EQ(monster->hp(), 100); in MutateFlatBuffersTest()
406 TEST_EQ(hp_ok_2, true); in MutateFlatBuffersTest()
407 TEST_EQ(monster->hp(), 20); in MutateFlatBuffersTest()
412 TEST_EQ(mana_default_ok, in MutateFlatBuffersTest()
414 TEST_EQ(monster->mana(), 150); in MutateFlatBuffersTest()
416 TEST_EQ(mana_ok, false); // Field was NOT present, because default value. in MutateFlatBuffersTest()
417 TEST_EQ(monster->mana(), 150); in MutateFlatBuffersTest()
423 TEST_EQ(test3.a(), 50); in MutateFlatBuffersTest()
429 TEST_EQ(inventory->Get(9), 100); in MutateFlatBuffersTest()
434 TEST_EQ(first->hp(), 1000); in MutateFlatBuffersTest()
436 TEST_EQ(first->hp(), 0); in MutateFlatBuffersTest()
478 TEST_EQ(len1, len2); in ObjectFlatBuffersTest()
479 TEST_EQ(memcmp(fbb1.GetBufferPointer(), fbb2.GetBufferPointer(), len1), 0); in ObjectFlatBuffersTest()
485 TEST_EQ(monster2->hp, 80); in ObjectFlatBuffersTest()
486 TEST_EQ(monster2->mana, 150); // default in ObjectFlatBuffersTest()
491 TEST_EQ(pos->z(), 3); in ObjectFlatBuffersTest()
492 TEST_EQ(pos->test3().a(), 10); in ObjectFlatBuffersTest()
493 TEST_EQ(pos->test3().b(), 20); in ObjectFlatBuffersTest()
496 TEST_EQ(inventory.size(), 10UL); in ObjectFlatBuffersTest()
499 TEST_EQ(*it, inv_data[it - inventory.begin()]); in ObjectFlatBuffersTest()
501 TEST_EQ(monster2->color, Color_Blue); in ObjectFlatBuffersTest()
508 TEST_EQ(vecofstrings.size(), 4U); in ObjectFlatBuffersTest()
513 TEST_EQ(vecofstrings2.size(), 2U); in ObjectFlatBuffersTest()
518 TEST_EQ(vecoftables.size(), 3U); in ObjectFlatBuffersTest()
520 TEST_EQ(vecoftables[0]->hp, 1000); in ObjectFlatBuffersTest()
525 TEST_EQ(tests[0].a(), 10); in ObjectFlatBuffersTest()
526 TEST_EQ(tests[0].b(), 20); in ObjectFlatBuffersTest()
527 TEST_EQ(tests[1].a(), 30); in ObjectFlatBuffersTest()
528 TEST_EQ(tests[1].b(), 40); in ObjectFlatBuffersTest()
541 TEST_EQ(VerifySizePrefixedMonsterBuffer(verifier), true); in SizePrefixedTest()
545 TEST_EQ(m->mana(), 200); in SizePrefixedTest()
546 TEST_EQ(m->hp(), 300); in SizePrefixedTest()
553 TEST_EQ(__has_trivial_copy(Vec3), true); in TriviallyCopyableTest()
556 TEST_EQ(std::is_trivially_copyable<Vec3>::value, true); in TriviallyCopyableTest()
566 TEST_EQ(flatbuffers::LoadFile((test_data_path + "monster_test.fbs").c_str(), in JsonDefaultTest()
575 TEST_EQ(parser.Parse(schemafile.c_str(), include_directories), true); in JsonDefaultTest()
586 TEST_EQ(result, true); in JsonDefaultTest()
588 TEST_EQ(std::string::npos != jsongen.find("color: \"Blue\""), true); in JsonDefaultTest()
590 TEST_EQ(std::string::npos != jsongen.find("testf: 3.14159"), true); in JsonDefaultTest()
599 TEST_EQ(flatbuffers::LoadFile( in ParseAndGenerateTextTest()
604 TEST_EQ(flatbuffers::LoadFile( in ParseAndGenerateTextTest()
620 TEST_EQ(reflection::VerifySchemaBuffer(verifier), true); in ParseAndGenerateTextTest()
622 TEST_EQ(parser.Deserialize((const uint8_t *)schemafile.c_str(), schemafile.size()), true); in ParseAndGenerateTextTest()
624 TEST_EQ(parser.Parse(schemafile.c_str(), include_directories), true); in ParseAndGenerateTextTest()
626 TEST_EQ(parser.Parse(jsonfile.c_str(), include_directories), true); in ParseAndGenerateTextTest()
633 TEST_EQ(VerifyMonsterBuffer(verifier), true); in ParseAndGenerateTextTest()
643 TEST_EQ(result, true); in ParseAndGenerateTextTest()
667 TEST_EQ(ok, true); in ParseAndGenerateTextTest()
672 TEST_EQ(flatbuffers::LoadFile((test_data_path + "unicode_test.json").c_str(), in ParseAndGenerateTextTest()
675 TEST_EQ(parser.Parse(jsonfile_utf8.c_str(), include_directories), true); in ParseAndGenerateTextTest()
681 TEST_EQ( in ParseAndGenerateTextTest()
690 TEST_EQ(flatbuffers::LoadFile((test_data_path + "monster_test.bfbs").c_str(), in ReflectionTest()
697 TEST_EQ(reflection::VerifySchemaBuffer(verifier), true); in ReflectionTest()
708 TEST_EQ(hp_field.id(), 2); in ReflectionTest()
709 TEST_EQ(hp_field.type()->base_type(), reflection::Short); in ReflectionTest()
718 TEST_EQ(pos_field_ptr->type()->base_type(), reflection::Obj); in ReflectionTest()
727 TEST_EQ(flatbuffers::Verify(schema, *schema.root_table(), flatbuf, length), in ReflectionTest()
731 TEST_EQ(hp, 80); in ReflectionTest()
736 TEST_EQ(hp_int64, 80); in ReflectionTest()
738 TEST_EQ(hp_double, 80.0); in ReflectionTest()
745 TEST_EQ(flatbuffers::GetAnyFieldF(*pos_struct, in ReflectionTest()
754 TEST_EQ(flatbuffers::GetAnyFieldF(*test3_struct, in ReflectionTest()
761 TEST_EQ(hp, 200); in ReflectionTest()
766 TEST_EQ(hp_int64, 300); in ReflectionTest()
769 TEST_EQ(hp_int64, 300); in ReflectionTest()
772 TEST_EQ(hp_int64, 300); in ReflectionTest()
775 TEST_EQ(flatbuffers::Verify(schema, *schema.root_table(), flatbuf, length), in ReflectionTest()
803 TEST_EQ(rinventory->Get(10), 50); in ReflectionTest()
837 TEST_EQ(VerifyMonsterBuffer(resize_verifier), true); in ReflectionTest()
840 TEST_EQ(flatbuffers::Verify(schema, *schema.root_table(), in ReflectionTest()
862 TEST_EQ(flatbuffers::Verify(schema, *schema.root_table(), in ReflectionTest()
905 TEST_EQ( in ParseProtoTest()
909 TEST_EQ( in ParseProtoTest()
913 TEST_EQ( in ParseProtoTest()
927 TEST_EQ(parser.Parse(protofile.c_str(), include_directories), true); in ParseProtoTest()
934 TEST_EQ(parser2.Parse(fbs.c_str(), nullptr), true); in ParseProtoTest()
940 TEST_EQ(parser3.Parse(protofile.c_str(), include_directories), true); in ParseProtoTest()
947 TEST_EQ(parser4.Parse(fbs_union.c_str(), nullptr), true); in ParseProtoTest()
955 TEST_EQ(read, val); in CompareTableFieldValue()
1182 TEST_EQ(parser.Parse(schema.c_str()), true); in FuzzTest2()
1187 TEST_EQ(parser.Parse(json.c_str()), true); in FuzzTest2()
1193 TEST_EQ(result, true); in FuzzTest2()
1316 TEST_EQ(parser.Parse(schema.c_str()), true); in TestValue()
1320 TEST_EQ(done, true); in TestValue()
1325 TEST_EQ(GenerateText(parser, parser.builder_.GetBufferPointer(), &print_back), in TestValue()
1328 if (check_default) { TEST_EQ(parser.Parse(print_back.c_str()), true); } in TestValue()
1340 TEST_EQ(FloatCompare(TestValue<float>("{ Y:0.0314159e+2 }", "float"), in ValueTest()
1344 TEST_EQ(FloatCompare(TestValue<float>("{ Y:\"0.0314159e+2\" }", "float"), in ValueTest()
1349 TEST_EQ(FloatCompare(TestValue<float>("{ Y:cos(rad(180)) }", "float"), -1), in ValueTest()
1353 TEST_EQ(TestValue<int>("{ Y:\"-876\" }", "int=-123"), -876); in ValueTest()
1354 TEST_EQ(TestValue<int>("{ Y:\"876\" }", "int=-123"), 876); in ValueTest()
1357 TEST_EQ(TestValue<int>("{ Y:-0x8ea0 }", "int=-0x8ea0"), -36512); in ValueTest()
1358 TEST_EQ(TestValue<int>(nullptr, "int=-0x8ea0"), -36512); in ValueTest()
1361 TEST_EQ(TestValue<int>("{ Y:0x1abcdef }", "int=0x1"), 0x1abcdef); in ValueTest()
1363 TEST_EQ(TestValue<int>("{ Y:+0x1abcdef }", "int=+0x1"), 0x1abcdef); in ValueTest()
1365 TEST_EQ(TestValue<int>("{ Y:\"0x1abcdef\" }", "int=+0x1"), 0x1abcdef); in ValueTest()
1368 TEST_EQ(TestValue<uint64_t>("{ Y:12335089644688340133 }", "ulong"), in ValueTest()
1372 TEST_EQ(TestValue<bool>("{ Y:\"false\" }", "bool=true"), false); in ValueTest()
1373 TEST_EQ(TestValue<bool>("{ Y:\"true\" }", "bool=\"true\""), true); in ValueTest()
1374 TEST_EQ(TestValue<bool>("{ Y:'false' }", "bool=true"), false); in ValueTest()
1375 TEST_EQ(TestValue<bool>("{ Y:'true' }", "bool=\"true\""), true); in ValueTest()
1378 TEST_EQ(TestValue<int>("/*before*/ { Y:1 } /*after*/", "int"), 1); in ValueTest()
1379 TEST_EQ(TestValue<int>("//before \n { Y:1 } //after", "int"), 1); in ValueTest()
1385 TEST_EQ(parser1.Parse("struct Test { a:short; b:byte; } table T { F:[Test]; }" in NestedListTest()
1393 TEST_EQ(parser1.Parse("enum E:byte { A, B, C } table T { F:[E]; }" in EnumStringsTest()
1398 TEST_EQ(parser2.Parse("enum E:byte { A, B, C } table T { F:[int]; }" in EnumStringsTest()
1511 TEST_EQ(TestValue<int8_t>("{ Y:127 }", "byte"), 127); in IntegerBoundaryTest()
1512 TEST_EQ(TestValue<int8_t>("{ Y:-128 }", "byte"), -128); in IntegerBoundaryTest()
1513 TEST_EQ(TestValue<uint8_t>("{ Y:255 }", "ubyte"), 255); in IntegerBoundaryTest()
1514 TEST_EQ(TestValue<uint8_t>("{ Y:0 }", "ubyte"), 0); in IntegerBoundaryTest()
1515 TEST_EQ(TestValue<int16_t>("{ Y:32767 }", "short"), 32767); in IntegerBoundaryTest()
1516 TEST_EQ(TestValue<int16_t>("{ Y:-32768 }", "short"), -32768); in IntegerBoundaryTest()
1517 TEST_EQ(TestValue<uint16_t>("{ Y:65535 }", "ushort"), 65535); in IntegerBoundaryTest()
1518 TEST_EQ(TestValue<uint16_t>("{ Y:0 }", "ushort"), 0); in IntegerBoundaryTest()
1519 TEST_EQ(TestValue<int32_t>("{ Y:2147483647 }", "int"), 2147483647); in IntegerBoundaryTest()
1520 TEST_EQ(TestValue<int32_t>("{ Y:-2147483648 }", "int"), (-2147483647 - 1)); in IntegerBoundaryTest()
1521 TEST_EQ(TestValue<uint32_t>("{ Y:4294967295 }", "uint"), 4294967295); in IntegerBoundaryTest()
1522 TEST_EQ(TestValue<uint32_t>("{ Y:0 }", "uint"), 0); in IntegerBoundaryTest()
1523 TEST_EQ(TestValue<int64_t>("{ Y:9223372036854775807 }", "long"), in IntegerBoundaryTest()
1525 TEST_EQ(TestValue<int64_t>("{ Y:-9223372036854775808 }", "long"), in IntegerBoundaryTest()
1527 TEST_EQ(TestValue<uint64_t>("{ Y:18446744073709551615 }", "ulong"), in IntegerBoundaryTest()
1529 TEST_EQ(TestValue<uint64_t>("{ Y:0 }", "ulong"), 0); in IntegerBoundaryTest()
1530 TEST_EQ(TestValue<uint64_t>("{ Y: 18446744073709551615 }", "uint64"), in IntegerBoundaryTest()
1533 TEST_EQ(TestValue<uint64_t>(nullptr, "uint64 = 18446744073709551615"), in IntegerBoundaryTest()
1541 TEST_EQ(TestValue<float>("{ Y:+3.4029e+38 }", "float"), +infinityf); in ValidFloatTest()
1542 TEST_EQ(TestValue<float>("{ Y:-3.4029e+38 }", "float"), -infinityf); in ValidFloatTest()
1543 TEST_EQ(TestValue<double>("{ Y:+1.7977e+308 }", "double"), +infinityd); in ValidFloatTest()
1544 TEST_EQ(TestValue<double>("{ Y:-1.7977e+308 }", "double"), -infinityd); in ValidFloatTest()
1546 TEST_EQ( in ValidFloatTest()
1550 TEST_EQ(FloatCompare(TestValue<float>("{ Y:\" 0.0314159e+2 \" }", "float"), in ValidFloatTest()
1554 TEST_EQ(TestValue<float>("{ Y:1 }", "float"), 1.0f); in ValidFloatTest()
1555 TEST_EQ(TestValue<float>("{ Y:1.0 }", "float"), 1.0f); in ValidFloatTest()
1556 TEST_EQ(TestValue<float>("{ Y:1. }", "float"), 1.0f); in ValidFloatTest()
1557 TEST_EQ(TestValue<float>("{ Y:+1. }", "float"), 1.0f); in ValidFloatTest()
1558 TEST_EQ(TestValue<float>("{ Y:-1. }", "float"), -1.0f); in ValidFloatTest()
1559 TEST_EQ(TestValue<float>("{ Y:1.e0 }", "float"), 1.0f); in ValidFloatTest()
1560 TEST_EQ(TestValue<float>("{ Y:1.e+0 }", "float"), 1.0f); in ValidFloatTest()
1561 TEST_EQ(TestValue<float>("{ Y:1.e-0 }", "float"), 1.0f); in ValidFloatTest()
1562 TEST_EQ(TestValue<float>("{ Y:0.125 }", "float"), 0.125f); in ValidFloatTest()
1563 TEST_EQ(TestValue<float>("{ Y:.125 }", "float"), 0.125f); in ValidFloatTest()
1564 TEST_EQ(TestValue<float>("{ Y:-.125 }", "float"), -0.125f); in ValidFloatTest()
1565 TEST_EQ(TestValue<float>("{ Y:+.125 }", "float"), +0.125f); in ValidFloatTest()
1566 TEST_EQ(TestValue<float>("{ Y:5 }", "float"), 5.0f); in ValidFloatTest()
1567 TEST_EQ(TestValue<float>("{ Y:\"5\" }", "float"), 5.0f); in ValidFloatTest()
1572 TEST_EQ(TestValue<double>("{ Y:6.9294956446009195e15 }", "double"), in ValidFloatTest()
1575 TEST_EQ(std::isnan(TestValue<double>("{ Y:nan }", "double")), true); in ValidFloatTest()
1576 TEST_EQ(std::isnan(TestValue<float>("{ Y:nan }", "float")), true); in ValidFloatTest()
1577 TEST_EQ(std::isnan(TestValue<float>("{ Y:\"nan\" }", "float")), true); in ValidFloatTest()
1578 TEST_EQ(std::isnan(TestValue<float>("{ Y:+nan }", "float")), true); in ValidFloatTest()
1579 TEST_EQ(std::isnan(TestValue<float>("{ Y:-nan }", "float")), true); in ValidFloatTest()
1580 TEST_EQ(std::isnan(TestValue<float>(nullptr, "float=nan")), true); in ValidFloatTest()
1581 TEST_EQ(std::isnan(TestValue<float>(nullptr, "float=-nan")), true); in ValidFloatTest()
1583 TEST_EQ(TestValue<float>("{ Y:inf }", "float"), infinityf); in ValidFloatTest()
1584 TEST_EQ(TestValue<float>("{ Y:\"inf\" }", "float"), infinityf); in ValidFloatTest()
1585 TEST_EQ(TestValue<float>("{ Y:+inf }", "float"), infinityf); in ValidFloatTest()
1586 TEST_EQ(TestValue<float>("{ Y:-inf }", "float"), -infinityf); in ValidFloatTest()
1587 TEST_EQ(TestValue<float>(nullptr, "float=inf"), infinityf); in ValidFloatTest()
1588 TEST_EQ(TestValue<float>(nullptr, "float=-inf"), -infinityf); in ValidFloatTest()
1601 TEST_EQ(TestValue<double>("{ Y:0x12.34p-1 }", "double"), 9.1015625); in ValidFloatTest()
1603 TEST_EQ(TestValue<float>("{ Y:-0x0.2p0 }", "float"), -0.125f); in ValidFloatTest()
1604 TEST_EQ(TestValue<float>("{ Y:-0x.2p1 }", "float"), -0.25f); in ValidFloatTest()
1605 TEST_EQ(TestValue<float>("{ Y:0x1.2p3 }", "float"), 9.0f); in ValidFloatTest()
1606 TEST_EQ(TestValue<float>("{ Y:0x10.1p0 }", "float"), 16.0625f); in ValidFloatTest()
1607 TEST_EQ(TestValue<double>("{ Y:0x1.2p3 }", "double"), 9.0); in ValidFloatTest()
1608 TEST_EQ(TestValue<double>("{ Y:0x10.1p0 }", "double"), 16.0625); in ValidFloatTest()
1609 TEST_EQ(TestValue<double>("{ Y:0xC.68p+2 }", "double"), 49.625); in ValidFloatTest()
1687 TEST_EQ(flatbuffers::StringToNumber("1q", &x), false); in NumericUtilsTestInteger()
1688 TEST_EQ(x, 0); in NumericUtilsTestInteger()
1689 TEST_EQ(flatbuffers::StringToNumber(upper, &x), false); in NumericUtilsTestInteger()
1690 TEST_EQ(x, flatbuffers::numeric_limits<T>::max()); in NumericUtilsTestInteger()
1691 TEST_EQ(flatbuffers::StringToNumber(lower, &x), false); in NumericUtilsTestInteger()
1695 TEST_EQ(x, expval); in NumericUtilsTestInteger()
1701 TEST_EQ(flatbuffers::StringToNumber("", &f), false); in NumericUtilsTestFloat()
1702 TEST_EQ(flatbuffers::StringToNumber("1q", &f), false); in NumericUtilsTestFloat()
1703 TEST_EQ(f, 0); in NumericUtilsTestFloat()
1704 TEST_EQ(flatbuffers::StringToNumber(upper, &f), true); in NumericUtilsTestFloat()
1705 TEST_EQ(f, +flatbuffers::numeric_limits<T>::infinity()); in NumericUtilsTestFloat()
1706 TEST_EQ(flatbuffers::StringToNumber(lower, &f), true); in NumericUtilsTestFloat()
1707 TEST_EQ(f, -flatbuffers::numeric_limits<T>::infinity()); in NumericUtilsTestFloat()
1726 TEST_EQ(flatbuffers::is_alpha(c), alpha); in IsAsciiUtilsTest()
1727 TEST_EQ(flatbuffers::is_alnum(c), alpha || dec); in IsAsciiUtilsTest()
1728 TEST_EQ(flatbuffers::is_digit(c), dec); in IsAsciiUtilsTest()
1729 TEST_EQ(flatbuffers::is_xdigit(c), dec || hex); in IsAsciiUtilsTest()
1738 TEST_EQ(parser.Parse("table T { F:string; }" in UnicodeTest()
1748 TEST_EQ(result, true); in UnicodeTest()
1757 TEST_EQ( in UnicodeTestAllowNonUTF8()
1768 TEST_EQ(result, true); in UnicodeTestAllowNonUTF8()
1780 TEST_EQ( in UnicodeTestGenerateTextFailsOnNonUTF8()
1794 TEST_EQ(result, false); in UnicodeTestGenerateTextFailsOnNonUTF8()
1800 TEST_EQ(parser.Parse("table T { F:string (id: 0); }" in UnicodeSurrogatesTest()
1961 TEST_EQ(parser.Parse("table T { str:string; i:int;}" in UnknownFieldsTest()
1978 TEST_EQ(result, true); in UnknownFieldsTest()
1985 TEST_EQ(parser.Parse("table T { A:int; }" in ParseUnionTest()
1993 TEST_EQ(parser2.Parse("namespace N; table A {} namespace; union U { N.A }" in ParseUnionTest()
2002 TEST_EQ(flatbuffers::LoadFile((test_data_path + "monster_test.fbs").c_str(), in InvalidNestedFlatbufferTest()
2010 TEST_EQ(parser1.Parse(schemafile.c_str(), include_directories), true); in InvalidNestedFlatbufferTest()
2013 TEST_EQ(parser1.Parse("{ name: \"Bender\", testnestedflatbuffer: { name: " in InvalidNestedFlatbufferTest()
2023 TEST_EQ(flatbuffers::LoadFile( in UnionVectorTest()
2032 TEST_EQ(parser.Parse(schemafile.c_str()), true); in UnionVectorTest()
2061 TEST_EQ(VerifyMovieBuffer(verifier), true); in UnionVectorTest()
2066 TEST_EQ(movie->main_character_type() == Character_Rapunzel, true); in UnionVectorTest()
2069 TEST_EQ(movie->characters_type()->size(), 5); in UnionVectorTest()
2070 TEST_EQ(cts->GetEnum<Character>(0) == Character_Belle, true); in UnionVectorTest()
2071 TEST_EQ(cts->GetEnum<Character>(1) == Character_MuLan, true); in UnionVectorTest()
2072 TEST_EQ(cts->GetEnum<Character>(2) == Character_BookFan, true); in UnionVectorTest()
2073 TEST_EQ(cts->GetEnum<Character>(3) == Character_Other, true); in UnionVectorTest()
2074 TEST_EQ(cts->GetEnum<Character>(4) == Character_Unused, true); in UnionVectorTest()
2078 TEST_EQ(rapunzel->hair_length(), 6); in UnionVectorTest()
2081 TEST_EQ(cs->size(), 5); in UnionVectorTest()
2083 TEST_EQ(belle->books_read(), 7); in UnionVectorTest()
2085 TEST_EQ(mu_lan->sword_attack_damage(), 5); in UnionVectorTest()
2087 TEST_EQ(book_fan->books_read(), 2); in UnionVectorTest()
2097 TEST_EQ(movie_object->main_character.AsRapunzel()->hair_length(), 6); in UnionVectorTest()
2098 TEST_EQ(movie_object->characters[0].AsBelle()->books_read(), 7); in UnionVectorTest()
2099 TEST_EQ(movie_object->characters[1].AsMuLan()->sword_attack_damage, 5); in UnionVectorTest()
2100 TEST_EQ(movie_object->characters[2].AsBookFan()->books_read(), 2); in UnionVectorTest()
2157 TEST_EQ(parser.Parse("table T { A:int; } enum E:byte { A }"), true); in ConformTest()
2162 TEST_EQ(parser2.Parse(test), true); in ConformTest()
2182 TEST_EQ( in ParseProtoBufAsciiTest()
2185 TEST_EQ(parser.Parse("{ A [1 2] C { B:2 }}"), true); in ParseProtoBufAsciiTest()
2190 TEST_EQ(ok, true); in ParseProtoBufAsciiTest()
2257 TEST_EQ(map.size(), 7); in FlexBuffersTest()
2259 TEST_EQ(vec.size(), 5); in FlexBuffersTest()
2260 TEST_EQ(vec[0].AsInt64(), -100); in FlexBuffersTest()
2262 TEST_EQ(vec[1].AsInt64(), 0); // Number parsing failed. in FlexBuffersTest()
2263 TEST_EQ(vec[2].AsDouble(), 4.0); in FlexBuffersTest()
2264 TEST_EQ(vec[2].AsString().IsTheEmptyString(), true); // Wrong Type. in FlexBuffersTest()
2269 TEST_EQ(vec[0].As<int64_t>(), -100); in FlexBuffersTest()
2271 TEST_EQ(vec[1].As<int64_t>(), 0); // Number parsing failed. in FlexBuffersTest()
2272 TEST_EQ(vec[2].As<double>(), 4.0); in FlexBuffersTest()
2275 TEST_EQ(vec[3].IsBlob(), true); in FlexBuffersTest()
2277 TEST_EQ(blob.size(), 1); in FlexBuffersTest()
2278 TEST_EQ(blob.data()[0], 77); in FlexBuffersTest()
2279 TEST_EQ(vec[4].IsBool(), true); // Check if type is a bool in FlexBuffersTest()
2280 TEST_EQ(vec[4].AsBool(), false); // Check if value is false in FlexBuffersTest()
2282 TEST_EQ(tvec.size(), 3); in FlexBuffersTest()
2283 TEST_EQ(tvec[2].AsInt8(), 3); in FlexBuffersTest()
2285 TEST_EQ(tvec3.size(), 3); in FlexBuffersTest()
2286 TEST_EQ(tvec3[2].AsInt8(), 3); in FlexBuffersTest()
2287 TEST_EQ(map["bool"].AsBool(), true); in FlexBuffersTest()
2289 TEST_EQ(tvecb.ElementType(), flexbuffers::FBT_BOOL); in FlexBuffersTest()
2290 TEST_EQ(map["foo"].AsUInt8(), 100); in FlexBuffersTest()
2291 TEST_EQ(map["unknown"].IsNull(), true); in FlexBuffersTest()
2294 TEST_EQ(mymap.Keys()[0].AsKey(), map.Keys()[4].AsKey()); in FlexBuffersTest()
2295 TEST_EQ(mymap.Values()[0].AsString().c_str(), vec[1].AsString().c_str()); in FlexBuffersTest()
2297 TEST_EQ(vec[0].MutateInt(-99), true); in FlexBuffersTest()
2298 TEST_EQ(vec[0].AsInt64(), -99); in FlexBuffersTest()
2299 TEST_EQ(vec[1].MutateString("John"), true); // Size must match. in FlexBuffersTest()
2301 TEST_EQ(vec[1].MutateString("Alfred"), false); // Too long. in FlexBuffersTest()
2302 TEST_EQ(vec[2].MutateFloat(2.0f), true); in FlexBuffersTest()
2303 TEST_EQ(vec[2].AsFloat(), 2.0f); in FlexBuffersTest()
2304 TEST_EQ(vec[2].MutateFloat(3.14159), false); // Double does not fit in float. in FlexBuffersTest()
2305 TEST_EQ(vec[4].AsBool(), false); // Is false before change in FlexBuffersTest()
2306 TEST_EQ(vec[4].MutateBool(true), true); // Can change a bool in FlexBuffersTest()
2307 TEST_EQ(vec[4].AsBool(), true); // Changed bool is now true in FlexBuffersTest()
2313 TEST_EQ(parser.ParseFlexBuffer(jsontest, nullptr, &slb), true); in FlexBuffersTest()
2317 TEST_EQ(jvec[0].AsInt64(), 123); in FlexBuffersTest()
2318 TEST_EQ(jvec[1].AsDouble(), 456.0); in FlexBuffersTest()
2320 TEST_EQ(jmap["c"].IsBool(), true); // Parsed correctly to a bool in FlexBuffersTest()
2321 TEST_EQ(jmap["c"].AsBool(), true); // Parsed correctly to true in FlexBuffersTest()
2322 TEST_EQ(jmap["d"].IsBool(), true); // Parsed correctly to a bool in FlexBuffersTest()
2323 TEST_EQ(jmap["d"].AsBool(), false); // Parsed correctly to false in FlexBuffersTest()
2345 TEST_EQ(ta->i8(), flatbuffers::numeric_limits<int8_t>::min()); in TypeAliasesTest()
2346 TEST_EQ(ta->u8(), flatbuffers::numeric_limits<uint8_t>::max()); in TypeAliasesTest()
2347 TEST_EQ(ta->i16(), flatbuffers::numeric_limits<int16_t>::min()); in TypeAliasesTest()
2348 TEST_EQ(ta->u16(), flatbuffers::numeric_limits<uint16_t>::max()); in TypeAliasesTest()
2349 TEST_EQ(ta->i32(), flatbuffers::numeric_limits<int32_t>::min()); in TypeAliasesTest()
2350 TEST_EQ(ta->u32(), flatbuffers::numeric_limits<uint32_t>::max()); in TypeAliasesTest()
2351 TEST_EQ(ta->i64(), flatbuffers::numeric_limits<int64_t>::min()); in TypeAliasesTest()
2352 TEST_EQ(ta->u64(), flatbuffers::numeric_limits<uint64_t>::max()); in TypeAliasesTest()
2353 TEST_EQ(ta->f32(), 2.3f); in TypeAliasesTest()
2354 TEST_EQ(ta->f64(), 2.3); in TypeAliasesTest()
2369 TEST_EQ(flatbuffers::EndianSwap(static_cast<int16_t>(0x1234)), 0x3412); in EndianSwapTest()
2370 TEST_EQ(flatbuffers::EndianSwap(static_cast<int32_t>(0x12345678)), in EndianSwapTest()
2372 TEST_EQ(flatbuffers::EndianSwap(static_cast<int64_t>(0x1234567890ABCDEF)), in EndianSwapTest()
2374 TEST_EQ(flatbuffers::EndianSwap(flatbuffers::EndianSwap(3.14f)), 3.14f); in EndianSwapTest()
2399 TEST_EQ(test_0->a(), 10); in UninitializedVectorTest()
2400 TEST_EQ(test_0->b(), 20); in UninitializedVectorTest()
2401 TEST_EQ(test_1->a(), 30); in UninitializedVectorTest()
2402 TEST_EQ(test_1->b(), 40); in UninitializedVectorTest()
2408 TEST_EQ(b == a, true); in EqualOperatorTest()
2411 TEST_EQ(b == a, false); in EqualOperatorTest()
2413 TEST_EQ(b == a, true); in EqualOperatorTest()
2416 TEST_EQ(b == a, false); in EqualOperatorTest()
2418 TEST_EQ(b == a, true); in EqualOperatorTest()
2421 TEST_EQ(b == a, false); in EqualOperatorTest()
2432 TEST_EQ(VerifyMonsterBuffer(verifier), true); in LoadVerifyBinaryTest()
2441 TEST_EQ(one1.o, one2.o); in CreateSharedStringTest()
2443 TEST_EQ(onetwo.o != one1.o, true); in CreateSharedStringTest()
2444 TEST_EQ(onetwo.o != two.o, true); in CreateSharedStringTest()
2452 TEST_EQ(null_b1.o != null_c.o, true); // Issue#5058 repro in CreateSharedStringTest()
2453 TEST_EQ(null_b1.o, null_b2.o); in CreateSharedStringTest()
2467 TEST_EQ(testarrayofstring->size(), flatbuffers::uoffset_t(7)); in CreateSharedStringTest()
2473 TEST_EQ(a[4]->str(), (std::string(chars_b, sizeof(chars_b)))); in CreateSharedStringTest()
2474 TEST_EQ(a[5]->str(), (std::string(chars_c, sizeof(chars_c)))); in CreateSharedStringTest()
2475 TEST_EQ(a[6]->str(), (std::string(chars_b, sizeof(chars_b)))); in CreateSharedStringTest()
2478 TEST_EQ((*a[0]) < (*a[1]), true); in CreateSharedStringTest()
2479 TEST_EQ((*a[1]) < (*a[0]), false); in CreateSharedStringTest()
2480 TEST_EQ((*a[1]) < (*a[2]), false); in CreateSharedStringTest()
2481 TEST_EQ((*a[2]) < (*a[1]), true); in CreateSharedStringTest()
2482 TEST_EQ((*a[4]) < (*a[3]), true); in CreateSharedStringTest()
2483 TEST_EQ((*a[5]) < (*a[4]), false); in CreateSharedStringTest()
2484 TEST_EQ((*a[5]) < (*a[4]), false); in CreateSharedStringTest()
2485 TEST_EQ((*a[6]) < (*a[5]), true); in CreateSharedStringTest()