Forráskód Böngészése

test: non_trivially_destructible with storage (test coverage for future optimizations)

skypjack 1 hete
szülő
commit
3b3638ac8a
3 módosított fájl, 4 hozzáadás és 2 törlés
  1. 1 0
      TODO
  2. 1 1
      test/CMakeLists.txt
  3. 2 1
      test/entt/entity/storage.cpp

+ 1 - 0
TODO

@@ -34,3 +34,4 @@ TODO:
 * organizer: view/storage only based model, no registry
 * introduce a way to inject stl from outside too
 * redesign snapshot as a whole
+* stoage: trivial destructor on exit (ie shrink_to_size) and clear/pop_all

+ 1 - 1
test/CMakeLists.txt

@@ -55,7 +55,7 @@ function(SETUP_TARGET TARGET_NAME)
                     -Wno-exceptions
                     -Wconversion
                 >
-                /EHsc /wd4324 /wd4996
+                /EHsc /wd4324 /wd4996 /bigobj
                 # disabling INCREMENTAL is required by SizeBench
                 $<$<CONFIG:Debug>:/Od /INCREMENTAL:NO>
                 $<$<CONFIG:Release>:/O2>

+ 2 - 1
test/entt/entity/storage.cpp

@@ -16,6 +16,7 @@
 #include "../../common/config.h"
 #include "../../common/linter.hpp"
 #include "../../common/new_delete.h"
+#include "../../common/non_trivially_destructible.h"
 #include "../../common/pointer_stable.h"
 #include "../../common/throwing_allocator.hpp"
 #include "../../common/throwing_type.hpp"
@@ -86,7 +87,7 @@ struct Storage: StorageBase {
 template<typename Type>
 using StorageDeathTest = Storage<Type>;
 
-using StorageTypes = ::testing::Types<int, test::pointer_stable>;
+using StorageTypes = ::testing::Types<int, test::pointer_stable, test::non_trivially_destructible>;
 
 TYPED_TEST_SUITE(Storage, StorageTypes, );
 TYPED_TEST_SUITE(StorageDeathTest, StorageTypes, );