/external/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ |
D | destroy_n.pass.cpp | 24 struct Counted { struct 27 Counted() { ++count; } in Counted() argument 28 Counted(Counted const&) { ++count; } in Counted() function 29 ~Counted() { --count; } in ~Counted() argument 30 friend void operator&(Counted) = delete; 32 int Counted::count = 0; 36 using It = forward_iterator<Counted*>; in main() 38 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in main() 39 Counted* p = (Counted*)pool; in main() 40 std::uninitialized_fill(p, p+N, Counted()); in main() [all …]
|
D | destroy.pass.cpp | 24 struct Counted { struct 27 Counted() { ++count; } in Counted() argument 28 Counted(Counted const&) { ++count; } in Counted() function 29 ~Counted() { --count; } in ~Counted() argument 30 friend void operator&(Counted) = delete; 32 int Counted::count = 0; 36 using It = forward_iterator<Counted*>; in main() 38 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in main() 39 Counted* p = (Counted*)pool; in main() 40 std::uninitialized_fill(p, p+N, Counted()); in main() [all …]
|
D | destroy_at.pass.cpp | 21 struct Counted { struct 24 Counted() { ++count; } in Counted() argument 25 Counted(Counted const&) { ++count; } in Counted() function 26 ~Counted() { --count; } in ~Counted() argument 27 friend void operator&(Counted) = delete; 29 int Counted::count = 0; 48 void* mem1 = std::malloc(sizeof(Counted)); in main() 49 void* mem2 = std::malloc(sizeof(Counted)); in main() 51 assert(Counted::count == 0); in main() 52 Counted* ptr1 = ::new(mem1) Counted(); in main() [all …]
|
/external/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ |
D | uninitialized_default_construct.pass.cpp | 24 struct Counted { struct 28 explicit Counted() { ++count; ++constructed; } in Counted() argument 29 Counted(Counted const&) { assert(false); } in Counted() function 30 ~Counted() { --count; } in ~Counted() argument 31 friend void operator&(Counted) = delete; 33 int Counted::count = 0; 34 int Counted::constructed = 0; 77 using It = forward_iterator<Counted*>; in test_counted() 79 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in test_counted() 80 Counted* p = (Counted*)pool; in test_counted() [all …]
|
D | uninitialized_default_construct_n.pass.cpp | 24 struct Counted { struct 28 explicit Counted() { ++count; ++constructed; } in Counted() argument 29 Counted(Counted const&) { assert(false); } in Counted() argument 30 ~Counted() { assert(count > 0); --count; } in ~Counted() argument 31 friend void operator&(Counted) = delete; 33 int Counted::count = 0; 34 int Counted::constructed = 0; 76 using It = forward_iterator<Counted*>; in test_counted() 78 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in test_counted() 79 Counted* p = (Counted*)pool; in test_counted() [all …]
|
/external/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ |
D | uninitialized_value_construct.pass.cpp | 24 struct Counted { struct 28 explicit Counted() { ++count; ++constructed; } in Counted() argument 29 Counted(Counted const&) { assert(false); } in Counted() argument 30 ~Counted() { assert(count > 0); --count; } in ~Counted() argument 31 friend void operator&(Counted) = delete; 33 int Counted::count = 0; 34 int Counted::constructed = 0; 76 using It = forward_iterator<Counted*>; in test_counted() 78 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in test_counted() 79 Counted* p = (Counted*)pool; in test_counted() [all …]
|
D | uninitialized_value_construct_n.pass.cpp | 24 struct Counted { struct 28 explicit Counted() { ++count; ++constructed; } in Counted() argument 29 Counted(Counted const&) { assert(false); } in Counted() function 30 ~Counted() { --count; } in ~Counted() argument 31 friend void operator&(Counted) = delete; 33 int Counted::count = 0; 34 int Counted::constructed = 0; 77 using It = forward_iterator<Counted*>; in test_counted() 79 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in test_counted() 80 Counted* p = (Counted*)pool; in test_counted() [all …]
|
/external/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ |
D | uninitialized_move.pass.cpp | 24 struct Counted { struct 28 explicit Counted(int&& x) : value(x) { x = 0; ++count; ++constructed; } in Counted() argument 29 Counted(Counted const&) { assert(false); } in Counted() argument 30 ~Counted() { assert(count > 0); --count; } in ~Counted() argument 31 friend void operator&(Counted) = delete; 34 int Counted::count = 0; argument 35 int Counted::constructed = 0; 84 using FIt = forward_iterator<Counted*>; in test_counted() 87 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in test_counted() 88 Counted* p = (Counted*)pool; in test_counted() [all …]
|
D | uninitialized_move_n.pass.cpp | 24 struct Counted { struct 28 explicit Counted(int&& x) : value(x) { x = 0; ++count; ++constructed; } in Counted() argument 29 Counted(Counted const&) { assert(false); } in Counted() function 30 ~Counted() { assert(count > 0); --count; } in ~Counted() argument 31 friend void operator&(Counted) = delete; 34 int Counted::count = 0; argument 35 int Counted::constructed = 0; 84 using FIt = forward_iterator<Counted*>; in test_counted() 87 alignas(Counted) char pool[sizeof(Counted)*N] = {}; in test_counted() 88 Counted* p = (Counted*)pool; in test_counted() [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_descr.py | 1101 class Counted(object): class 1104 Counted.counter += 1 1106 Counted.counter -= 1 1110 x.a = Counted() 1111 x.b = Counted() 1112 x.c = Counted() 1113 self.assertEqual(Counted.counter, 3) 1116 self.assertEqual(Counted.counter, 0) 1120 x.a = Counted() 1121 x.z = Counted() [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_descr.py | 1211 class Counted(object): class 1214 Counted.counter += 1 1216 Counted.counter -= 1 1220 x.a = Counted() 1221 x.b = Counted() 1222 x.c = Counted() 1223 self.assertEqual(Counted.counter, 3) 1226 self.assertEqual(Counted.counter, 0) 1230 x.a = Counted() 1231 x.z = Counted() [all …]
|