Skip to content

Commit 83f3635

Browse files
committed
update modifiers tests
1 parent d907f23 commit 83f3635

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tests/beman/inplace_vector/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,9 @@ add_gtest(compare)
4141
add_gtest(constructors)
4242
add_gtest(size_n_data)
4343
add_gtest(erasure)
44+
add_gtest(modifiers)
4445
add_gtest(freestanding)
4546

46-
target_compile_definitions(
47-
beman.inplace_vector.tests.freestanding
48-
PRIVATE BEMAN_INPLACE_VECTOR_FREESTANDING_DELETED=1
49-
)
50-
5147
# constexpr test
5248
add_executable(beman.inplace_vector.tests.constexpr constexpr.test.cpp)
5349
target_link_libraries(

tests/beman/inplace_vector/modifiers.test.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
#include <gtest/gtest.h>
1+
#include <numeric>
22

33
#include "gtest_setup.hpp"
4+
#include <gtest/gtest.h>
45

56
namespace {
67
// 23.3.14.5 Modifiers [inplace.vector.modifiers]
78
template <typename Param> class Modifiers : public IVBasicTest<Param> {};
89
TYPED_TEST_SUITE(Modifiers, IVAllTypes);
910

11+
#if BEMAN_INPLACE_VECTOR_FREESTANDING_DELETED
12+
1013
TYPED_TEST(Modifiers, InsertSingleConstRef) {
1114
// constexpr iterator insert(const_iterator position, const T& x);
1215

@@ -429,6 +432,8 @@ TYPED_TEST(Modifiers, EmplaceBack) {
429432
EXPECT_THROW(device.emplace_back(0), std::bad_alloc);
430433
}
431434

435+
#endif
436+
432437
TYPED_TEST(Modifiers, TryEmplaceBack) {
433438
// template<class... Args>
434439
// constexpr pointer try_emplace_back(Args&&... args);

0 commit comments

Comments
 (0)