chromium/base/types/supports_ostream_operator_unittest.cc

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

#include "base/types/supports_ostream_operator.h"

#include <stdint.h>

#include <ostream>
#include <string>

namespace base {
namespace {

enum SimpleEnum {};
enum EnumWithExplicitType : uint64_t {};
enum class ScopedEnum {};
enum class ScopedEnumWithOperator {};
std::ostream& operator<<(std::ostream& os, ScopedEnumWithOperator v) {}
struct SimpleStruct {};
struct StructWithOperator {};
std::ostream& operator<<(std::ostream& os, const StructWithOperator& v) {}

// A few standard types that definitely support printing.
static_assert;
static_assert;
static_assert;

// Various kinds of enums operator<< support.
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;

// operator<< support on structs.
static_assert;
static_assert;
static_assert;
static_assert;

}  // namespace
}  // namespace base