#include <optional>
#include <utility>
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/tests/nullable_value_types_enums.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "mojo/public/interfaces/bindings/tests/nullable_value_types.mojom-shared.h"
#include "mojo/public/interfaces/bindings/tests/nullable_value_types.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo::test::nullable_value_types {
namespace {
kDefaultValue;
template <>
inline constexpr mojom::RegularEnum kDefaultValue<mojom::RegularEnum> =
mojom::RegularEnum::kThisValue;
kDefaultValue;
template <typename T>
std::pair<bool, T> FromOpt(const std::optional<T>& opt) { … }
template <typename T>
std::optional<T> ToOpt(bool has_value, T value) { … }
std::optional<mojom::RegularEnum> Transform(
std::optional<mojom::RegularEnum> in) { … }
std::optional<TypemappedEnum> Transform(std::optional<TypemappedEnum> in) { … }
std::optional<bool> Transform(std::optional<bool> in) { … }
std::optional<uint8_t> Transform(std::optional<uint8_t> in) { … }
std::optional<uint16_t> Transform(std::optional<uint16_t> in) { … }
std::optional<uint32_t> Transform(std::optional<uint32_t> in) { … }
std::optional<uint64_t> Transform(std::optional<uint64_t> in) { … }
std::optional<int8_t> Transform(std::optional<int8_t> in) { … }
std::optional<int16_t> Transform(std::optional<int16_t> in) { … }
std::optional<int32_t> Transform(std::optional<int32_t> in) { … }
std::optional<int64_t> Transform(std::optional<int64_t> in) { … }
std::optional<float> Transform(std::optional<float> in) { … }
std::optional<double> Transform(std::optional<double> in) { … }
class InterfaceV1Impl : public mojom::InterfaceV1 { … };
enum class CallerVersion { … };
class InterfaceV2Impl : public mojom::InterfaceV2 { … };
class NullableValueTypes : public ::testing::Test { … };
TEST_F(NullableValueTypes, StructWithEnums) { … }
TEST_F(NullableValueTypes, MethodEnumArgsCompatibility) { … }
TEST_F(NullableValueTypes, MethodStructWithEnumsCompatibility) { … }
TEST_F(NullableValueTypes, StructWithNumerics) { … }
TEST_F(NullableValueTypes, MethodNumericArgsCompatibility) { … }
TEST_F(NullableValueTypes, MethodStructWithNumericsCompatibility) { … }
TEST_F(NullableValueTypes, Versioning) { … }
}
}