summaryrefslogtreecommitdiff
path: root/asl/tests/box_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/tests/box_tests.cpp')
-rw-r--r--asl/tests/box_tests.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/asl/tests/box_tests.cpp b/asl/tests/box_tests.cpp
index f1a35f3..3813639 100644
--- a/asl/tests/box_tests.cpp
+++ b/asl/tests/box_tests.cpp
@@ -4,30 +4,20 @@
#include "asl/tests/test_types.hpp"
static_assert(sizeof(asl::box<int>) == sizeof(int*));
-static_assert(asl::default_constructible<asl::box<int>>);
static_assert(!asl::copyable<asl::box<int>>);
static_assert(asl::moveable<asl::box<int>>);
-static_assert(asl::default_constructible<asl::box<NonMoveConstructible>>);
+static_assert(asl::has_niche<asl::box<int>>);
ASL_TEST(destructor)
{
bool d = false;
{
- asl::box<DestructorObserver> box2;
-
- {
- auto box = asl::make_box<DestructorObserver>(&d);
- ASL_TEST_ASSERT(!d);
-
-
- auto box3 = ASL_MOVE(box);
- ASL_TEST_ASSERT(!d);
-
- box2 = ASL_MOVE(box3);
- ASL_TEST_ASSERT(!d);
- }
-
+ auto box = asl::make_box<DestructorObserver>(&d);
+ ASL_TEST_ASSERT(!d);
+
+
+ auto box3 = ASL_MOVE(box);
ASL_TEST_ASSERT(!d);
}