فهرست منبع

table: let's write some tests

Michele Caini 1 سال پیش
والد
کامیت
bf854b0b5f
1فایلهای تغییر یافته به همراه16 افزوده شده و 2 حذف شده
  1. 16 2
      test/entt/entity/table.cpp

+ 16 - 2
test/entt/entity/table.cpp

@@ -1,6 +1,20 @@
+#include <memory>
+#include <tuple>
+#include <type_traits>
+#include <utility>
 #include <gtest/gtest.h>
+#include <entt/core/iterator.hpp>
 #include <entt/entity/table.hpp>
+#include "../../common/linter.hpp"
+
+TEST(Table, Constructors) {
+    entt::table<int, char> table;
+
+    ASSERT_NO_THROW([[maybe_unused]] auto alloc = table.get_allocator());
+
+    table = entt::table<int, char>{std::allocator<void>{}};
+
+    ASSERT_NO_THROW([[maybe_unused]] auto alloc = table.get_allocator());
+}
 
-TEST(Table, Placeholder) {
-    [[maybe_unused]] entt::table<int, char> table{};
 }