Home | History | Annotate | Download | only in base

Lines Matching defs:Test

38 // Object used to test complex object with Optional<T> in addition of the move
203 TEST(OptionalTest, DefaultConstructor) {
220 TEST(OptionalTest, CopyConstructor) {
258 TEST(OptionalTest, ValueConstructor) {
285 TEST(OptionalTest, MoveConstructor) {
353 TEST(OptionalTest, MoveValueConstructor) {
388 TEST(OptionalTest, ConvertingCopyConstructor) {
403 TEST(OptionalTest, ConvertingMoveConstructor) {
447 TEST(OptionalTest, ConstructorForwardArguments) {
473 TEST(OptionalTest, ConstructorForwardInitListAndArguments) {
489 TEST(OptionalTest, ForwardConstructor) {
496 // Test that default type of 'U' is value_type.
523 struct Test {
524 Test() : param_type(ParamType::DEFAULT_CONSTRUCTED) {}
525 Test(const Test&) : param_type(ParamType::COPY_CONSTRUCTED) {}
526 Test(Test&&) : param_type(ParamType::MOVE_CONSTRUCTED) {}
527 explicit Test(int) : param_type(ParamType::INT) {}
528 explicit Test(in_place_t) : param_type(ParamType::IN_PLACE) {}
529 explicit Test(Optional<int>) : param_type(ParamType::OPTIONAL_INT) {}
537 Optional<Test> testee(arg);
543 Optional<Test> testee(Optional<int>(in_place, 1));
549 Optional<Test> testee(in_place);
555 struct Test {
556 Test(int) {} // NOLINT(runtime/explicit)
559 static_assert(std::is_convertible<int, Test>::value,
560 "Int should be convertible to Test.");
561 ([](Optional<Test>) {})(1);
565 TEST(OptionalTest, NulloptConstructor) {
570 TEST(OptionalTest, AssignValue) {
612 TEST(OptionalTest, AssignObject) {
705 TEST(OptionalTest, AssignObject_rvalue) {
803 TEST(OptionalTest, AssignNull) {
829 TEST(OptionalTest, AssignOverload) {
1011 TEST(OptionalTest, OperatorStar) {
1028 TEST(OptionalTest, OperatorStar_rvalue) {
1034 TEST(OptionalTest, OperatorArrow) {
1039 TEST(OptionalTest, Value_rvalue) {
1046 TEST(OptionalTest, ValueOr) {
1093 TEST(OptionalTest, Swap_bothNoValue) {
1103 TEST(OptionalTest, Swap_inHasValue) {
1115 TEST(OptionalTest, Swap_outHasValue) {
1126 TEST(OptionalTest, Swap_bothValue) {
1139 TEST(OptionalTest, Emplace) {
1183 TEST(OptionalTest, Equals_TwoEmpty) {
1190 TEST(OptionalTest, Equals_TwoEquals) {
1197 TEST(OptionalTest, Equals_OneEmpty) {
1204 TEST(OptionalTest, Equals_TwoDifferent) {
1211 TEST(OptionalTest, Equals_DifferentType) {
1218 TEST(OptionalTest, NotEquals_TwoEmpty) {
1225 TEST(OptionalTest, NotEquals_TwoEquals) {
1232 TEST(OptionalTest, NotEquals_OneEmpty) {
1239 TEST(OptionalTest, NotEquals_TwoDifferent) {
1246 TEST(OptionalTest, NotEquals_DifferentType) {
1253 TEST(OptionalTest, Less_LeftEmpty) {
1260 TEST(OptionalTest, Less_RightEmpty) {
1267 TEST(OptionalTest, Less_BothEmpty) {
1274 TEST(OptionalTest, Less_BothValues) {
1295 TEST(OptionalTest, Less_DifferentType) {
1302 TEST(OptionalTest, LessEq_LeftEmpty) {
1309 TEST(OptionalTest, LessEq_RightEmpty) {
1316 TEST(OptionalTest, LessEq_BothEmpty) {
1323 TEST(OptionalTest, LessEq_BothValues) {
1344 TEST(OptionalTest, LessEq_DifferentType) {
1351 TEST(OptionalTest, Greater_BothEmpty) {
1358 TEST(OptionalTest, Greater_LeftEmpty) {
1365 TEST(OptionalTest, Greater_RightEmpty) {
1372 TEST(OptionalTest, Greater_BothValue) {
1393 TEST(OptionalTest, Greater_DifferentType) {
1400 TEST(OptionalTest, GreaterEq_BothEmpty) {
1407 TEST(OptionalTest, GreaterEq_LeftEmpty) {
1414 TEST(OptionalTest, GreaterEq_RightEmpty) {
1421 TEST(OptionalTest, GreaterEq_BothValue) {
1442 TEST(OptionalTest, GreaterEq_DifferentType) {
1449 TEST(OptionalTest, OptNullEq) {
1460 TEST(OptionalTest, NullOptEq) {
1471 TEST(OptionalTest, OptNullNotEq) {
1482 TEST(OptionalTest, NullOptNotEq) {
1493 TEST(OptionalTest, OptNullLower) {
1504 TEST(OptionalTest, NullOptLower) {
1515 TEST(OptionalTest, OptNullLowerEq) {
1526 TEST(OptionalTest, NullOptLowerEq) {
1537 TEST(OptionalTest, OptNullGreater) {
1548 TEST(OptionalTest, NullOptGreater) {
1559 TEST(OptionalTest, OptNullGreaterEq) {
1570 TEST(OptionalTest, NullOptGreaterEq) {
1581 TEST(OptionalTest, ValueEq_Empty) {
1586 TEST(OptionalTest, ValueEq_NotEmpty) {
1597 TEST(OptionalTest, ValueEq_DifferentType) {
1602 TEST(OptionalTest, EqValue_Empty) {
1607 TEST(OptionalTest, EqValue_NotEmpty) {
1618 TEST(OptionalTest, EqValue_DifferentType) {
1623 TEST(OptionalTest, ValueNotEq_Empty) {
1628 TEST(OptionalTest, ValueNotEq_NotEmpty) {
1639 TEST(OPtionalTest, ValueNotEq_DifferentType) {
1644 TEST(OptionalTest, NotEqValue_Empty) {
1649 TEST(OptionalTest, NotEqValue_NotEmpty) {
1660 TEST(OptionalTest, NotEqValue_DifferentType) {
1665 TEST(OptionalTest, ValueLess_Empty) {
1670 TEST(OptionalTest, ValueLess_NotEmpty) {
1685 TEST(OPtionalTest, ValueLess_DifferentType) {
1690 TEST(OptionalTest, LessValue_Empty) {
1695 TEST(OptionalTest, LessValue_NotEmpty) {
1710 TEST(OptionalTest, LessValue_DifferentType) {
1715 TEST(OptionalTest, ValueLessEq_Empty) {
1720 TEST(OptionalTest, ValueLessEq_NotEmpty) {
1735 TEST(OptionalTest, ValueLessEq_DifferentType) {
1740 TEST(OptionalTest, LessEqValue_Empty) {
1745 TEST(OptionalTest, LessEqValue_NotEmpty) {
1760 TEST(OptionalTest, LessEqValue_DifferentType) {
1765 TEST(OptionalTest, ValueGreater_Empty) {
1770 TEST(OptionalTest, ValueGreater_NotEmpty) {
1785 TEST(OptionalTest, ValueGreater_DifferentType) {
1790 TEST(OptionalTest, GreaterValue_Empty) {
1795 TEST(OptionalTest, GreaterValue_NotEmpty) {
1810 TEST(OptionalTest, GreaterValue_DifferentType) {
1815 TEST(OptionalTest, ValueGreaterEq_Empty) {
1820 TEST(OptionalTest, ValueGreaterEq_NotEmpty) {
1835 TEST(OptionalTest, ValueGreaterEq_DifferentType) {
1840 TEST(OptionalTest, GreaterEqValue_Empty) {
1845 TEST(OptionalTest, GreaterEqValue_NotEmpty) {
1860 TEST(OptionalTest, GreaterEqValue_DifferentType) {
1865 TEST(OptionalTest, NotEquals) {
1891 TEST(OptionalTest, NotEqualsNull) {
1914 TEST(OptionalTest, MakeOptional) {
1959 struct Test {
1960 Test(int x, double y, bool z) : a(x), b(y), c(z) {}
1967 Optional<Test> o = base::make_optional<Test>(1, 2.0, true);
1984 TEST(OptionalTest, NonMemberSwap_bothNoValue) {
1994 TEST(OptionalTest, NonMemberSwap_inHasValue) {
2005 TEST(OptionalTest, NonMemberSwap_outHasValue) {
2016 TEST(OptionalTest, NonMemberSwap_bothValue) {
2029 TEST(OptionalTest, Hash_OptionalReflectsInternal) {
2046 TEST(OptionalTest, Hash_NullOptEqualsNullOpt) {
2054 TEST(OptionalTest, Hash_UseInSet) {
2064 TEST(OptionalTest, HasValue) {
2081 TEST(OptionalTest, Reset_int) {
2091 TEST(OptionalTest, Reset_Object) {
2101 TEST(OptionalTest, Reset_NoOp) {
2109 TEST(OptionalTest, AssignFromRValue) {
2119 TEST(OptionalTest, DontCallDefaultCtor) {
2128 TEST(OptionalTest, DontCallNewMemberFunction) {
2136 TEST(OptionalTest, Noexcept) {