chromium/base/strings/to_string_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/strings/to_string.h"

#include <ios>
#include <ostream>
#include <string>

#include "testing/gtest/include/gtest/gtest.h"

namespace base {
namespace {

class NotStringifiable {};
class HasToString {};

// .ToString() support on structs.
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;

TEST(ToStringTest, Streamable) {}

enum class StreamableTestEnum {};

std::ostream& operator<<(std::ostream& os, const StreamableTestEnum& value) {}

TEST(ToStringTest, UserDefinedStreamable) {}

TEST(ToStringTest, UserDefinedToString) {}

class UnusualToString {};

TEST(ToStringTest, ToStringReturnsNonStdString) {}

enum class NonStreamableTestEnum {};

TEST(ToStringTest, ScopedEnum) {}

TEST(ToStringTest, IoManip) {}

TEST(ToStringTest, Tuple) {}

void Func() {}

TEST(ToStringTest, FunctionPointer) {}

class OverloadsAddressOp {};

TEST(ToStringTest, NonStringifiable) {}

}  // namespace
}  // namespace base