chromium/base/types/optional_unittest.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <memory>
#include <optional>
#include <set>
#include <string>
#include <type_traits>
#include <vector>

#include "base/test/gtest_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

ElementsAre;

namespace base {

namespace {

// Object used to test complex object with std::optional<T> in addition of the
// move semantics.
class TestObject {};

// Implementing Swappable concept.
void swap(TestObject& lhs, TestObject& rhs) {}

class NonTriviallyDestructible {};

class DeletedDefaultConstructor {};

class DeletedCopy {};

class DeletedMove {};

class NonTriviallyDestructibleDeletedCopyConstructor {};

class DeleteNewOperators {};

class TriviallyDestructibleOverloadAddressOf {};

class NonTriviallyDestructibleOverloadAddressOf {};

}  // anonymous namespace

static_assert;

static_assert;

TEST(OptionalTest, DefaultConstructor) {}

TEST(OptionalTest, CopyConstructor) {}

TEST(OptionalTest, ValueConstructor) {}

TEST(OptionalTest, MoveConstructor) {}

TEST(OptionalTest, MoveValueConstructor) {}

TEST(OptionalTest, ConvertingCopyConstructor) {}

TEST(OptionalTest, ConvertingMoveConstructor) {}

TEST(OptionalTest, ConstructorForwardArguments) {}

TEST(OptionalTest, ConstructorForwardInitListAndArguments) {}

TEST(OptionalTest, ForwardConstructor) {}

TEST(OptionalTest, NulloptConstructor) {}

TEST(OptionalTest, AssignValue) {}

TEST(OptionalTest, AssignObject) {}

TEST(OptionalTest, AssignObject_rvalue) {}

TEST(OptionalTest, AssignNull) {}

TEST(OptionalTest, AssignOverload) {}

TEST(OptionalTest, OperatorStar) {}

TEST(OptionalTest, OperatorStar_rvalue) {}

TEST(OptionalTest, OperatorArrow) {}

TEST(OptionalTest, Value_rvalue) {}

TEST(OptionalTest, ValueOr) {}

TEST(OptionalTest, Swap_bothNoValue) {}

TEST(OptionalTest, Swap_inHasValue) {}

TEST(OptionalTest, Swap_outHasValue) {}

TEST(OptionalTest, Swap_bothValue) {}

TEST(OptionalTest, Emplace) {}

TEST(OptionalTest, Equals_TwoEmpty) {}

TEST(OptionalTest, Equals_TwoEquals) {}

TEST(OptionalTest, Equals_OneEmpty) {}

TEST(OptionalTest, Equals_TwoDifferent) {}

TEST(OptionalTest, Equals_DifferentType) {}

TEST(OptionalTest, Equals_Value) {}

TEST(OptionalTest, NotEquals_TwoEmpty) {}

TEST(OptionalTest, NotEquals_TwoEquals) {}

TEST(OptionalTest, NotEquals_OneEmpty) {}

TEST(OptionalTest, NotEquals_TwoDifferent) {}

TEST(OptionalTest, NotEquals_DifferentType) {}

TEST(OptionalTest, NotEquals_Value) {}

TEST(OptionalTest, Less_LeftEmpty) {}

TEST(OptionalTest, Less_RightEmpty) {}

TEST(OptionalTest, Less_BothEmpty) {}

TEST(OptionalTest, Less_BothValues) {}

TEST(OptionalTest, Less_DifferentType) {}

TEST(OptionalTest, LessEq_LeftEmpty) {}

TEST(OptionalTest, LessEq_RightEmpty) {}

TEST(OptionalTest, LessEq_BothEmpty) {}

TEST(OptionalTest, LessEq_BothValues) {}

TEST(OptionalTest, LessEq_DifferentType) {}

TEST(OptionalTest, Greater_BothEmpty) {}

TEST(OptionalTest, Greater_LeftEmpty) {}

TEST(OptionalTest, Greater_RightEmpty) {}

TEST(OptionalTest, Greater_BothValue) {}

TEST(OptionalTest, Greater_DifferentType) {}

TEST(OptionalTest, GreaterEq_BothEmpty) {}

TEST(OptionalTest, GreaterEq_LeftEmpty) {}

TEST(OptionalTest, GreaterEq_RightEmpty) {}

TEST(OptionalTest, GreaterEq_BothValue) {}

TEST(OptionalTest, GreaterEq_DifferentType) {}

TEST(OptionalTest, OptNullEq) {}

TEST(OptionalTest, NullOptEq) {}

TEST(OptionalTest, OptNullNotEq) {}

TEST(OptionalTest, NullOptNotEq) {}

TEST(OptionalTest, OptNullLower) {}

TEST(OptionalTest, NullOptLower) {}

TEST(OptionalTest, OptNullLowerEq) {}

TEST(OptionalTest, NullOptLowerEq) {}

TEST(OptionalTest, OptNullGreater) {}

TEST(OptionalTest, NullOptGreater) {}

TEST(OptionalTest, OptNullGreaterEq) {}

TEST(OptionalTest, NullOptGreaterEq) {}

TEST(OptionalTest, ValueEq_Empty) {}

TEST(OptionalTest, ValueEq_NotEmpty) {}

TEST(OptionalTest, ValueEq_DifferentType) {}

TEST(OptionalTest, EqValue_Empty) {}

TEST(OptionalTest, EqValue_NotEmpty) {}

TEST(OptionalTest, EqValue_DifferentType) {}

TEST(OptionalTest, ValueNotEq_Empty) {}

TEST(OptionalTest, ValueNotEq_NotEmpty) {}

TEST(OptionalTest, ValueNotEq_DifferentType) {}

TEST(OptionalTest, NotEqValue_Empty) {}

TEST(OptionalTest, NotEqValue_NotEmpty) {}

TEST(OptionalTest, NotEqValue_DifferentType) {}

TEST(OptionalTest, ValueLess_Empty) {}

TEST(OptionalTest, ValueLess_NotEmpty) {}

TEST(OptionalTest, ValueLess_DifferentType) {}

TEST(OptionalTest, LessValue_Empty) {}

TEST(OptionalTest, LessValue_NotEmpty) {}

TEST(OptionalTest, LessValue_DifferentType) {}

TEST(OptionalTest, ValueLessEq_Empty) {}

TEST(OptionalTest, ValueLessEq_NotEmpty) {}

TEST(OptionalTest, ValueLessEq_DifferentType) {}

TEST(OptionalTest, LessEqValue_Empty) {}

TEST(OptionalTest, LessEqValue_NotEmpty) {}

TEST(OptionalTest, LessEqValue_DifferentType) {}

TEST(OptionalTest, ValueGreater_Empty) {}

TEST(OptionalTest, ValueGreater_NotEmpty) {}

TEST(OptionalTest, ValueGreater_DifferentType) {}

TEST(OptionalTest, GreaterValue_Empty) {}

TEST(OptionalTest, GreaterValue_NotEmpty) {}

TEST(OptionalTest, GreaterValue_DifferentType) {}

TEST(OptionalTest, ValueGreaterEq_Empty) {}

TEST(OptionalTest, ValueGreaterEq_NotEmpty) {}

TEST(OptionalTest, ValueGreaterEq_DifferentType) {}

TEST(OptionalTest, GreaterEqValue_Empty) {}

TEST(OptionalTest, GreaterEqValue_NotEmpty) {}

TEST(OptionalTest, GreaterEqValue_DifferentType) {}

TEST(OptionalTest, NotEquals) {}

TEST(OptionalTest, NotEqualsNull) {}

TEST(OptionalTest, MakeOptional) {}

TEST(OptionalTest, NonMemberSwap_bothNoValue) {}

TEST(OptionalTest, NonMemberSwap_inHasValue) {}

TEST(OptionalTest, NonMemberSwap_outHasValue) {}

TEST(OptionalTest, NonMemberSwap_bothValue) {}

TEST(OptionalTest, Hash_OptionalReflectsInternal) {}

TEST(OptionalTest, Hash_NullOptEqualsNullOpt) {}

TEST(OptionalTest, Hash_UseInSet) {}

TEST(OptionalTest, HasValue) {}

TEST(OptionalTest, Reset_int) {}

TEST(OptionalTest, Reset_Object) {}

TEST(OptionalTest, Reset_NoOp) {}

TEST(OptionalTest, AssignFromRValue) {}

TEST(OptionalTest, DontCallDefaultCtor) {}

TEST(OptionalTest, DontCallNewMemberFunction) {}

TEST(OptionalTest, DereferencingNoValueCrashes) {}

TEST(OptionalTest, Noexcept) {}

TEST(OptionalTest, OverrideAddressOf) {}

}  // namespace base