chromium/v8/test/unittests/heap/cppgc/logging-unittest.cc

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "include/cppgc/internal/logging.h"

#include <string>

#include "include/cppgc/source-location.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace cppgc {
namespace internal {

namespace {
// GCC < 9 has a bug due to which calling non-constexpr functions are not
// allowed even on constexpr path:
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67026.
#if !defined(__GNUC__) || defined(__clang__)
constexpr int CheckInConstexpr(int a) {}
#endif
}  // namespace

TEST(LoggingTest, Pass) {}

TEST(LoggingTest, Fail) {}

TEST(LoggingTest, DontReportUnused) {}

#if !defined(__GNUC__) || defined(__clang__)
TEST(LoggingTest, ConstexprContext) {}
#endif

#if DEBUG && !defined(OFFICIAL_BUILD) && GTEST_HAS_DEATH_TEST
TEST(LoggingTest, Message) {}

#if V8_SUPPORTS_SOURCE_LOCATION
TEST(LoggingTest, SourceLocation) {}
#endif  // V8_SUPPORTS_SOURCE_LOCATION

#endif  // DEBUG

}  // namespace internal
}  // namespace cppgc