1bb611c8fSApple OSS Distributions // 2bb611c8fSApple OSS Distributions // Tests for 3bb611c8fSApple OSS Distributions // safe_allocation(safe_allocation const&) = delete; 4bb611c8fSApple OSS Distributions // 5bb611c8fSApple OSS Distributions 6bb611c8fSApple OSS Distributions #include <libkern/c++/safe_allocation.h> 7bb611c8fSApple OSS Distributions #include <type_traits> 8bb611c8fSApple OSS Distributions #include <darwintest.h> 9bb611c8fSApple OSS Distributions #include "test_utils.h" 10bb611c8fSApple OSS Distributions 11bb611c8fSApple OSS Distributions struct T { 12bb611c8fSApple OSS Distributions int i; 13bb611c8fSApple OSS Distributions }; 14bb611c8fSApple OSS Distributions 15*8d741a5dSApple OSS Distributions T_DECL(ctor_copy, "safe_allocation.ctor.copy", T_META_TAG_VM_PREFERRED) { 16bb611c8fSApple OSS Distributions static_assert(!std::is_copy_constructible_v<test_safe_allocation<T> >); 17bb611c8fSApple OSS Distributions T_PASS("safe_allocation.ctor.copy passed"); 18bb611c8fSApple OSS Distributions } 19