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

This commit is contained in:
skypjack
2026-02-20 10:27:59 +01:00
parent 34d2994cf3
commit 3b3638ac8a
3 changed files with 4 additions and 2 deletions

1
TODO
View File

@@ -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

View File

@@ -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>

View File

@@ -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, );