Home
last modified time | relevance | path

Searched refs:test_deleter (Results 1 – 12 of 12) sorted by relevance

/external/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/
Dnullptr_t_deleter_allocator.pass.cpp34 std::shared_ptr<A> p(nullptr, test_deleter<A>(3), test_allocator<A>(5)); in main()
38 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
39 assert(test_deleter<A>::count == 1); in main()
40 assert(test_deleter<A>::dealloc_count == 0); in main()
47 assert(test_deleter<A>::count == 0); in main()
48 assert(test_deleter<A>::dealloc_count == 1); in main()
51 test_deleter<A>::dealloc_count = 0; in main()
54 std::shared_ptr<A> p(nullptr, test_deleter<A>(1), bare_allocator<void>()); in main()
58 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
59 assert(test_deleter<A>::count ==1); in main()
[all …]
Dpointer_deleter_allocator.pass.cpp36 std::shared_ptr<A> p(ptr, test_deleter<A>(3), test_allocator<A>(5)); in main()
40 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
41 assert(test_deleter<A>::count == 1); in main()
42 assert(test_deleter<A>::dealloc_count == 0); in main()
49 assert(test_deleter<A>::count == 0); in main()
50 assert(test_deleter<A>::dealloc_count == 1); in main()
53 test_deleter<A>::dealloc_count = 0; in main()
57 std::shared_ptr<A> p(ptr, test_deleter<A>(3), bare_allocator<void>()); in main()
61 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
62 assert(test_deleter<A>::count == 1); in main()
[all …]
Dnullptr_t_deleter.pass.cpp34 std::shared_ptr<A> p(nullptr, test_deleter<A>(3)); in main()
38 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
39 assert(test_deleter<A>::count == 1); in main()
40 assert(test_deleter<A>::dealloc_count == 0); in main()
45 assert(test_deleter<A>::count == 0); in main()
46 assert(test_deleter<A>::dealloc_count == 1); in main()
Dpointer_deleter.pass.cpp35 std::shared_ptr<A> p(ptr, test_deleter<A>(3)); in main()
39 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
40 assert(test_deleter<A>::count == 1); in main()
41 assert(test_deleter<A>::dealloc_count == 0); in main()
46 assert(test_deleter<A>::count == 0); in main()
47 assert(test_deleter<A>::dealloc_count == 1); in main()
Dnullptr_t_deleter_allocator_throw.pass.cpp35 std::shared_ptr<A> p(nullptr, test_deleter<A>(3), test_allocator<A>(5)); in main()
41 assert(test_deleter<A>::count == 0); in main()
42 assert(test_deleter<A>::dealloc_count == 1); in main()
Dpointer_deleter_allocator_throw.pass.cpp36 std::shared_ptr<A> p(ptr, test_deleter<A>(3), test_allocator<A>(5)); in main()
42 assert(test_deleter<A>::count == 0); in main()
43 assert(test_deleter<A>::dealloc_count == 1); in main()
Dnullptr_t_deleter_throw.pass.cpp54 std::shared_ptr<A> p(nullptr, test_deleter<A>(3)); in main()
60 assert(test_deleter<A>::count == 0); in main()
61 assert(test_deleter<A>::dealloc_count == 1); in main()
Dpointer_deleter_throw.pass.cpp55 std::shared_ptr<A> p(ptr, test_deleter<A>(3)); in main()
61 assert(test_deleter<A>::count == 0); in main()
62 assert(test_deleter<A>::dealloc_count == 1); in main()
/external/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.getdeleter/
Dget_deleter.pass.cpp36 std::shared_ptr<A> p(ptr, test_deleter<A>(3)); in main()
37 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
38 assert(test_deleter<A>::count == 1); in main()
39 assert(test_deleter<A>::dealloc_count == 0); in main()
44 assert(test_deleter<A>::count == 0); in main()
45 assert(test_deleter<A>::dealloc_count == 1); in main()
47 test_deleter<A>::dealloc_count = 0; in main()
50 std::shared_ptr<A> p(nullptr, test_deleter<A>(3)); in main()
51 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
52 assert(test_deleter<A>::count == 1); in main()
[all …]
/external/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/
Dreset_pointer_deleter.pass.cpp48 p.reset(ptr, test_deleter<A>(3)); in main()
53 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
54 assert(test_deleter<A>::count == 1); in main()
55 assert(test_deleter<A>::dealloc_count == 0); in main()
60 assert(test_deleter<A>::count == 0); in main()
61 assert(test_deleter<A>::dealloc_count == 1); in main()
65 p.reset(ptr, test_deleter<A>(3)); in main()
70 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
71 assert(test_deleter<A>::count == 1); in main()
72 assert(test_deleter<A>::dealloc_count == 1); in main()
[all …]
Dreset_pointer_deleter_allocator.pass.cpp49 p.reset(ptr, test_deleter<A>(3), test_allocator<A>(4)); in main()
54 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
55 assert(test_deleter<A>::count == 1); in main()
56 assert(test_deleter<A>::dealloc_count == 0); in main()
63 assert(test_deleter<A>::count == 0); in main()
64 assert(test_deleter<A>::dealloc_count == 1); in main()
70 p.reset(ptr, test_deleter<A>(3), test_allocator<A>(4)); in main()
75 test_deleter<A>* d = std::get_deleter<test_deleter<A> >(p); in main()
76 assert(test_deleter<A>::count == 1); in main()
77 assert(test_deleter<A>::dealloc_count == 1); in main()
[all …]
/external/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/
Dtest_deleter.h38 class test_deleter
45 test_deleter() : state_(0) {++count;} in test_deleter() function
46 explicit test_deleter(int s) : state_(s) {++count;} in test_deleter() function
47 test_deleter(const test_deleter& d) in test_deleter() function
49 ~test_deleter() {assert(state_ >= 0); --count; state_ = -1;} in ~test_deleter()
56 test_deleter* operator&() const DELETE_FUNCTION;
61 swap(test_deleter<T>& x, test_deleter<T>& y) in swap()
63 test_deleter<T> t(std::move(x)); in swap()