// // Tests for // explicit safe_allocation(); // #include #include #include "test_utils.h" struct T { int i; }; template static void tests() { { test_safe_allocation array; CHECK(array.data() == nullptr); CHECK(array.size() == 0); CHECK(array.begin() == array.end()); } { test_safe_allocation array{}; CHECK(array.data() == nullptr); CHECK(array.size() == 0); CHECK(array.begin() == array.end()); } { test_safe_allocation array = test_safe_allocation(); CHECK(array.data() == nullptr); CHECK(array.size() == 0); CHECK(array.begin() == array.end()); } } T_DECL(ctor_default, "safe_allocation.ctor.default", T_META_TAG_VM_PREFERRED) { tests(); tests(); }