• Home
  • Raw
  • Download

Lines Matching refs:TestObject

42 class TestObject {  class
55 TestObject() : foo_(0), bar_(0.0), state_(State::DEFAULT_CONSTRUCTED) {} in TestObject() function in perfetto::base::__anon2e1cf64a0111::TestObject
57 TestObject(int foo, double bar) in TestObject() function in perfetto::base::__anon2e1cf64a0111::TestObject
60 TestObject(const TestObject& other) in TestObject() function in perfetto::base::__anon2e1cf64a0111::TestObject
66 TestObject(TestObject&& other) in TestObject() function in perfetto::base::__anon2e1cf64a0111::TestObject
74 TestObject& operator=(const TestObject& other) { in operator =()
82 TestObject& operator=(TestObject&& other) { in operator =()
91 void Swap(TestObject* other) { in Swap()
100 bool operator==(const TestObject& other) const { in operator ==()
104 bool operator!=(const TestObject& other) const { return !(*this == other); } in operator !=()
118 void swap(TestObject& lhs, TestObject& rhs) { in swap()
217 Optional<TestObject> o; in TEST()
251 Optional<TestObject> first(TestObject(3, 0.1)); in TEST()
252 Optional<TestObject> other(first); in TEST()
255 EXPECT_TRUE(other.value() == TestObject(3, 0.1)); in TEST()
278 TestObject value(3, 0.1); in TEST()
279 Optional<TestObject> o(value); in TEST()
282 EXPECT_EQ(TestObject::State::COPY_CONSTRUCTED, o->state()); in TEST()
309 Optional<TestObject> first(TestObject(3, 0.1)); in TEST()
310 Optional<TestObject> second(std::move(first)); in TEST()
313 EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, second->state()); in TEST()
314 EXPECT_TRUE(TestObject(3, 0.1) == second.value()); in TEST()
317 EXPECT_EQ(TestObject::State::MOVED_FROM, first->state()); in TEST()
381 TestObject value(3, 0.1); in TEST()
382 Optional<TestObject> o(std::move(value)); in TEST()
385 EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, o->state()); in TEST()
386 EXPECT_EQ(TestObject(3, 0.1), o.value()); in TEST()
469 Optional<TestObject> a(base::in_place, 0, 0.1); in TEST()
471 EXPECT_TRUE(TestObject(0, 0.1) == a.value()); in TEST()
594 Optional<TestObject> a; in TEST()
596 a = TestObject(3, 0.1); in TEST()
599 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
604 Optional<TestObject> a = TestObject(4, 1.0); in TEST()
606 a = TestObject(3, 0.1); in TEST()
609 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
636 Optional<TestObject> a; in TEST()
637 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
641 EXPECT_TRUE(a.value() == TestObject(3, 0.1)); in TEST()
646 Optional<TestObject> a(TestObject(4, 1.0)); in TEST()
647 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
651 EXPECT_TRUE(a.value() == TestObject(3, 0.1)); in TEST()
729 Optional<TestObject> a; in TEST()
730 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
735 EXPECT_TRUE(TestObject(3, 0.1) == a.value()); in TEST()
737 EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, a->state()); in TEST()
738 EXPECT_EQ(TestObject::State::MOVED_FROM, b->state()); in TEST()
742 Optional<TestObject> a(TestObject(4, 1.0)); in TEST()
743 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
748 EXPECT_TRUE(TestObject(3, 0.1) == a.value()); in TEST()
750 EXPECT_EQ(TestObject::State::MOVE_ASSIGNED, a->state()); in TEST()
751 EXPECT_EQ(TestObject::State::MOVED_FROM, b->state()); in TEST()
823 Optional<TestObject> a(TestObject(3, 0.1)); in TEST()
824 Optional<TestObject> b(TestObject(4, 1.0)); in TEST()
1025 Optional<TestObject> a(TestObject(3, 0.1)); in TEST()
1033 EXPECT_TRUE(TestObject(3, 0.1) == *Optional<TestObject>(TestObject(3, 0.1))); in TEST()
1037 Optional<TestObject> a(TestObject(3, 0.1)); in TEST()
1044 EXPECT_TRUE(TestObject(3, 0.1) == in TEST()
1045 Optional<TestObject>(TestObject(3, 0.1)).value()); in TEST()
1084 Optional<TestObject> a; in TEST()
1085 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3)); in TEST()
1087 a = TestObject(3, 0.1); in TEST()
1088 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(3, 0.1)); in TEST()
1091 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3)); in TEST()
1096 Optional<TestObject> a, b; in TEST()
1101 EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42))); in TEST()
1102 EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42))); in TEST()
1106 Optional<TestObject> a(TestObject(1, 0.3)); in TEST()
1107 Optional<TestObject> b; in TEST()
1113 EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42))); in TEST()
1114 EXPECT_TRUE(TestObject(1, 0.3) == b.value_or(TestObject(42, 0.42))); in TEST()
1118 Optional<TestObject> a; in TEST()
1119 Optional<TestObject> b(TestObject(1, 0.3)); in TEST()
1124 EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42))); in TEST()
1125 EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42))); in TEST()
1129 Optional<TestObject> a(TestObject(0, 0.1)); in TEST()
1130 Optional<TestObject> b(TestObject(1, 0.3)); in TEST()
1135 EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42))); in TEST()
1136 EXPECT_TRUE(TestObject(0, 0.1) == b.value_or(TestObject(42, 0.42))); in TEST()
1137 EXPECT_EQ(TestObject::State::SWAPPED, a->state()); in TEST()
1138 EXPECT_EQ(TestObject::State::SWAPPED, b->state()); in TEST()
1159 Optional<TestObject> a(TestObject(0, 0.1)); in TEST()
1160 EXPECT_EQ(TestObject(1, 0.2), a.emplace(TestObject(1, 0.2))); in TEST()
1163 EXPECT_TRUE(TestObject(1, 0.2) == a.value()); in TEST()
1887 Optional<TestObject> a(TestObject(3, 0.1)); in TEST()
1888 Optional<TestObject> b(TestObject(4, 1.0)); in TEST()
1909 Optional<TestObject> a(TestObject(3, 0.1)); in TEST()
1910 Optional<TestObject> b(TestObject(3, 0.1)); in TEST()
1945 Optional<TestObject> o = base::make_optional(TestObject(3, 0.1)); in TEST()
1947 EXPECT_TRUE(TestObject(3, 0.1) == *o); in TEST()
1949 TestObject value = TestObject(0, 0.42); in TEST()
1952 EXPECT_TRUE(TestObject(0, 0.42) == *o); in TEST()
1953 EXPECT_EQ(TestObject::State::MOVED_FROM, value.state()); in TEST()
1954 EXPECT_EQ(TestObject::State::MOVE_ASSIGNED, o->state()); in TEST()
1956 EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, in TEST()
1987 Optional<TestObject> a, b; in TEST()
1992 EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42))); in TEST()
1993 EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42))); in TEST()
1997 Optional<TestObject> a(TestObject(1, 0.3)); in TEST()
1998 Optional<TestObject> b; in TEST()
2003 EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42))); in TEST()
2004 EXPECT_TRUE(TestObject(1, 0.3) == b.value_or(TestObject(42, 0.42))); in TEST()
2008 Optional<TestObject> a; in TEST()
2009 Optional<TestObject> b(TestObject(1, 0.3)); in TEST()
2014 EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42))); in TEST()
2015 EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42))); in TEST()
2019 Optional<TestObject> a(TestObject(0, 0.1)); in TEST()
2020 Optional<TestObject> b(TestObject(1, 0.3)); in TEST()
2025 EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42))); in TEST()
2026 EXPECT_TRUE(TestObject(0, 0.1) == b.value_or(TestObject(42, 0.42))); in TEST()
2027 EXPECT_EQ(TestObject::State::SWAPPED, a->state()); in TEST()
2028 EXPECT_EQ(TestObject::State::SWAPPED, b->state()); in TEST()
2094 Optional<TestObject> a(TestObject(0, 0.1)); in TEST()
2096 EXPECT_EQ(TestObject(0, 0.1), a.value()); in TEST()
2100 EXPECT_EQ(TestObject(42, 0.0), a.value_or(TestObject(42, 0.0))); in TEST()
2112 Optional<TestObject> a; in TEST()
2115 TestObject obj; in TEST()