Home
last modified time | relevance | path

Searched refs:MoveOnlyInt (Results 1 – 10 of 10) sorted by relevance

/external/libchrome/base/test/
Dmove_only_int.h14 class MoveOnlyInt {
16 explicit MoveOnlyInt(int data = 1) : data_(data) {} in data_()
17 MoveOnlyInt(MoveOnlyInt&& other) : data_(other.data_) { other.data_ = 0; } in MoveOnlyInt() function
18 ~MoveOnlyInt() { data_ = 0; } in ~MoveOnlyInt()
20 MoveOnlyInt& operator=(MoveOnlyInt&& other) {
26 friend bool operator==(const MoveOnlyInt& lhs, const MoveOnlyInt& rhs) {
30 friend bool operator!=(const MoveOnlyInt& lhs, const MoveOnlyInt& rhs) {
34 friend bool operator<(const MoveOnlyInt& lhs, int rhs) {
38 friend bool operator<(int lhs, const MoveOnlyInt& rhs) {
42 friend bool operator<(const MoveOnlyInt& lhs, const MoveOnlyInt& rhs) {
[all …]
/external/libchrome/base/containers/
Dflat_map_unittest.cc52 using pair = std::pair<MoveOnlyInt, MoveOnlyInt>; in TEST()
54 flat_map<MoveOnlyInt, MoveOnlyInt> original; in TEST()
55 original.insert(pair(MoveOnlyInt(1), MoveOnlyInt(1))); in TEST()
56 original.insert(pair(MoveOnlyInt(2), MoveOnlyInt(2))); in TEST()
57 original.insert(pair(MoveOnlyInt(3), MoveOnlyInt(3))); in TEST()
58 original.insert(pair(MoveOnlyInt(4), MoveOnlyInt(4))); in TEST()
60 flat_map<MoveOnlyInt, MoveOnlyInt> moved(std::move(original)); in TEST()
62 EXPECT_EQ(1U, moved.count(MoveOnlyInt(1))); in TEST()
63 EXPECT_EQ(1U, moved.count(MoveOnlyInt(2))); in TEST()
64 EXPECT_EQ(1U, moved.count(MoveOnlyInt(3))); in TEST()
[all …]
Dflat_set_unittest.cc49 flat_set<MoveOnlyInt> original(std::begin(input_range), std::end(input_range), in TEST()
51 flat_set<MoveOnlyInt> moved(std::move(original)); in TEST()
53 EXPECT_EQ(1U, moved.count(MoveOnlyInt(1))); in TEST()
54 EXPECT_EQ(1U, moved.count(MoveOnlyInt(2))); in TEST()
55 EXPECT_EQ(1U, moved.count(MoveOnlyInt(3))); in TEST()
56 EXPECT_EQ(1U, moved.count(MoveOnlyInt(4))); in TEST()
95 using ExplicitInt = base::MoveOnlyInt; in TEST()
Dvector_buffer_unittest.cc29 VectorBuffer<MoveOnlyInt> buffer(size); in TEST()
31 new (buffer.begin() + i) MoveOnlyInt(i + 1); in TEST()
55 VectorBuffer<MoveOnlyInt> dest(size); in TEST()
57 VectorBuffer<MoveOnlyInt> original(size); in TEST()
59 new (original.begin() + i) MoveOnlyInt(i + 1); in TEST()
Dflat_tree_unittest.cc157 using MoveOnlyTree = flat_tree<MoveOnlyInt,
158 MoveOnlyInt,
159 GetKeyFromValueIdentity<MoveOnlyInt>,
160 std::less<MoveOnlyInt>>;
405 EXPECT_EQ(1U, moved.count(MoveOnlyInt(1))); in TEST()
406 EXPECT_EQ(1U, moved.count(MoveOnlyInt(2))); in TEST()
407 EXPECT_EQ(1U, moved.count(MoveOnlyInt(3))); in TEST()
408 EXPECT_EQ(1U, moved.count(MoveOnlyInt(4))); in TEST()
414 using Pair = std::pair<int, MoveOnlyInt>; in TEST()
420 storage.push_back(Pair(2, MoveOnlyInt(0))); in TEST()
[all …]
Dcircular_deque_unittest.cc91 circular_deque<MoveOnlyInt> first(std::begin(values), std::end(values)); in TEST()
93 circular_deque<MoveOnlyInt> second(std::move(first)); in TEST()
828 circular_deque<MoveOnlyInt> q(std::begin(values), std::end(values)); in TEST()
830 q.emplace(q.begin(), MoveOnlyInt(0)); in TEST()
831 q.emplace(q.begin() + 2, MoveOnlyInt(2)); in TEST()
832 q.emplace(q.end(), MoveOnlyInt(4)); in TEST()
/external/webrtc/api/
Drtc_error_unittest.cc22 struct MoveOnlyInt { struct
23 MoveOnlyInt() {} in MoveOnlyInt() function
24 explicit MoveOnlyInt(int value) : value(value) {} in MoveOnlyInt() function
25 MoveOnlyInt(const MoveOnlyInt& other) = delete;
26 MoveOnlyInt& operator=(const MoveOnlyInt& other) = delete;
27 MoveOnlyInt(MoveOnlyInt&& other) : value(other.value) {} in MoveOnlyInt() function
28 MoveOnlyInt& operator=(MoveOnlyInt&& other) { in operator =() argument
49 explicit MoveOnlyInt2(MoveOnlyInt&& other) : value(other.value) {} in MoveOnlyInt2()
50 MoveOnlyInt2& operator=(MoveOnlyInt&& other) { in operator =()
157 RTCErrorOr<MoveOnlyInt> e; in TEST()
[all …]
/external/python/pybind11/tests/
Dtest_copy_move.cpp37 class MoveOnlyInt { class
39 MoveOnlyInt() { print_default_created(this); } in MoveOnlyInt() function in MoveOnlyInt
40 MoveOnlyInt(int v) : value{std::move(v)} { print_created(this, value); } in MoveOnlyInt() function in MoveOnlyInt
41 MoveOnlyInt(MoveOnlyInt &&m) { print_move_created(this, m.value); std::swap(value, m.value); } in MoveOnlyInt() function in MoveOnlyInt
42MoveOnlyInt &operator=(MoveOnlyInt &&m) { print_move_assigned(this, m.value); std::swap(value, m.v… in operator =()
43 MoveOnlyInt(const MoveOnlyInt &) = delete;
44 MoveOnlyInt &operator=(const MoveOnlyInt &) = delete;
45 ~MoveOnlyInt() { print_destroyed(this); } in ~MoveOnlyInt()
73 template <> struct type_caster<MoveOnlyInt> {
74 PYBIND11_TYPE_CASTER(MoveOnlyInt, _("MoveOnlyInt"));
[all …]
/external/skqp/tests/
DTArrayTest.cpp107 struct MoveOnlyInt { in test_swap() struct
108 MoveOnlyInt(int i) : fInt(i) {} in test_swap() function
109 MoveOnlyInt(MoveOnlyInt&& that) : fInt(that.fInt) {} in test_swap() argument
114 SkTArray<MoveOnlyInt> moi; in test_swap()
115 SkSTArray< 5, MoveOnlyInt> moi5; in test_swap()
116 SkSTArray<10, MoveOnlyInt> moi10; in test_swap()
117 SkSTArray<20, MoveOnlyInt> moi20; in test_swap()
118 SkTArray<MoveOnlyInt>* arraysMoi[] = { &moi, &moi5, &moi10, &moi20 }; in test_swap()
/external/skia/tests/
DTArrayTest.cpp213 struct MoveOnlyInt { in test_swap() struct
214 MoveOnlyInt(int i) : fInt(i) {} in test_swap() function
215 MoveOnlyInt(MoveOnlyInt&& that) : fInt(that.fInt) {} in test_swap() argument
220 SkTArray<MoveOnlyInt> moi; in test_swap()
221 SkSTArray< 5, MoveOnlyInt> moi5; in test_swap()
222 SkSTArray<10, MoveOnlyInt> moi10; in test_swap()
223 SkSTArray<20, MoveOnlyInt> moi20; in test_swap()
224 SkTArray<MoveOnlyInt>* arraysMoi[] = { &moi, &moi5, &moi10, &moi20 }; in test_swap()