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