xref: /xnu-11417.140.69/tests/safe_allocation_src/assign.copy.cpp (revision 43a90889846e00bfb5cf1d255cdc0a701a1e05a4)
1*43a90889SApple OSS Distributions //
2*43a90889SApple OSS Distributions // Tests for
3*43a90889SApple OSS Distributions //  safe_allocation& operator=(safe_allocation const&) = delete;
4*43a90889SApple OSS Distributions //
5*43a90889SApple OSS Distributions 
6*43a90889SApple OSS Distributions #include <libkern/c++/safe_allocation.h>
7*43a90889SApple OSS Distributions #include <type_traits>
8*43a90889SApple OSS Distributions #include <darwintest.h>
9*43a90889SApple OSS Distributions #include "test_utils.h"
10*43a90889SApple OSS Distributions 
11*43a90889SApple OSS Distributions struct T { };
12*43a90889SApple OSS Distributions 
13*43a90889SApple OSS Distributions T_DECL(assign_copy, "safe_allocation.assign.copy", T_META_TAG_VM_PREFERRED) {
14*43a90889SApple OSS Distributions 	static_assert(!std::is_copy_assignable_v<test_safe_allocation<T> >);
15*43a90889SApple OSS Distributions 	T_PASS("safe_allocation.assign.copy passed");
16*43a90889SApple OSS Distributions }
17