瀏覽代碼

table: refine tests with exceptions enabled

Michele Caini 2 年之前
父節點
當前提交
7a605742ee
共有 1 個文件被更改,包括 1 次插入6 次删除
  1. 1 6
      test/entt/entity/table.cpp

+ 1 - 6
test/entt/entity/table.cpp

@@ -498,15 +498,10 @@ TEST(Table, ThrowingAllocator) {
     table.get_allocator().template throw_counter<int>(0u);
 
     ASSERT_THROW(table.reserve(1u), test::throwing_allocator_exception);
-    ASSERT_EQ(table.capacity(), 0u);
 
+    table.get_allocator().template throw_counter<int>(0u);
     table.get_allocator().template throw_counter<char>(0u);
 
     ASSERT_THROW(table.emplace(), test::throwing_allocator_exception);
-    ASSERT_TRUE(table.empty());
-
-    table.get_allocator().template throw_counter<int>(0u);
-
     ASSERT_THROW(table.emplace(3, 'c'), test::throwing_allocator_exception);
-    ASSERT_TRUE(table.empty());
 }