Correct TypeID and TypeName
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 2m31s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 36s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 1m8s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 1m4s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 59s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 54s
Bigfoot / Clang Format Checks (push) Successful in 10s
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 2m31s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 36s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 1m8s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 1m4s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 59s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 54s
Bigfoot / Clang Format Checks (push) Successful in 10s
This commit is contained in:
@@ -54,20 +54,23 @@ TEST_F(BigFileFixture, Lol)
|
||||
test.Asset().mana = 42;
|
||||
|
||||
test.Asset().asset_header->name = "Instance";
|
||||
test.Asset().asset_header->type_id = 1;
|
||||
test.Asset().asset_header->type_name = "AssetA";
|
||||
test.Asset().asset_header->uuid = uuid;
|
||||
test.Asset().asset_header->version = 2;
|
||||
|
||||
const eastl::vector<std::byte> flatbuffer = test.Pack();
|
||||
|
||||
EXPECT_STREQ(FlatAssetWrapper<Flat::AssetA>::TypeName().data(), "Bigfoot.Flat.AssetA");
|
||||
EXPECT_EQ(FlatAssetWrapper<Flat::AssetA>::TypeID(),
|
||||
rapidhash(FlatAssetWrapper<Flat::AssetA>::TypeName().data(),
|
||||
FlatAssetWrapper<Flat::AssetA>::TypeName().size()));
|
||||
|
||||
FlatAssetWrapper<Flat::AssetA> test2 {flatbuffer};
|
||||
EXPECT_EQ(test2.Asset().health, 100);
|
||||
EXPECT_EQ(test2.Asset().mana, 42);
|
||||
|
||||
EXPECT_STREQ(test2.Asset().asset_header->name.c_str(), "Instance");
|
||||
EXPECT_EQ(test2.Asset().asset_header->type_id, 1);
|
||||
EXPECT_STREQ(test2.Asset().asset_header->type_name.c_str(), "AssetA");
|
||||
EXPECT_EQ(test2.Asset().asset_header->type_id, FlatAssetWrapper<Flat::AssetA>::TypeID());
|
||||
EXPECT_STREQ(test2.Asset().asset_header->type_name.c_str(), FlatAssetWrapper<Flat::AssetA>::TypeName().data());
|
||||
EXPECT_EQ(test2.Asset().asset_header->uuid, uuid);
|
||||
EXPECT_EQ(test2.Asset().asset_header->version, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user