From b6a71dbdbef22ef65326281189a6c95617d7e1ab Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 3 May 2024 09:47:23 +0200 Subject: [PATCH] table: test emplace function --- test/entt/entity/table.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/entt/entity/table.cpp b/test/entt/entity/table.cpp index e47b13c99..7eab45772 100644 --- a/test/entt/entity/table.cpp +++ b/test/entt/entity/table.cpp @@ -368,6 +368,15 @@ TEST(Table, IteratorConversion) { ASSERT_NE(++cit, it); } +TEST(Table, Emplace) { + entt::table table; + + testing::StaticAssertTypeEq>(); + + ASSERT_EQ(table.emplace(), std::make_tuple(int{}, char{})); + ASSERT_EQ(table.emplace(3, 'c'), std::make_tuple(3, 'c')); +} + TEST(Table, Indexing) { entt::table table;