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