]>
git.saurik.com Git - apple/xnu.git/blob - tests/safe_allocation_src/ctor.default.cpp
3 // explicit safe_allocation();
6 #include <libkern/c++/safe_allocation.h>
7 #include <darwintest.h>
8 #include "test_utils.h"
19 test_safe_allocation
<T
> array
;
20 CHECK(array
.data() == nullptr);
21 CHECK(array
.size() == 0);
22 CHECK(array
.begin() == array
.end());
25 test_safe_allocation
<T
> array
{};
26 CHECK(array
.data() == nullptr);
27 CHECK(array
.size() == 0);
28 CHECK(array
.begin() == array
.end());
31 test_safe_allocation
<T
> array
= test_safe_allocation
<T
>();
32 CHECK(array
.data() == nullptr);
33 CHECK(array
.size() == 0);
34 CHECK(array
.begin() == array
.end());
38 T_DECL(ctor_default
, "safe_allocation.ctor.default") {