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