Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(812)

Unified Diff: mojo/public/cpp/environment/tests/logger_unittest.cc

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/environment/tests/logger_unittest.cc
diff --git a/mojo/public/cpp/environment/tests/logger_unittest.cc b/mojo/public/cpp/environment/tests/logger_unittest.cc
deleted file mode 100644
index 7aef2ee8aed377644b9153ce222a1a88a26e9c44..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/environment/tests/logger_unittest.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Chromium 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 "mojo/public/c/environment/logger.h"
-#include "mojo/public/cpp/environment/environment.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace mojo {
-namespace {
-
-TEST(LoggerTest, Basic) {
- Environment environment;
- const MojoLogger* const logger = Environment::GetDefaultLogger();
-
- logger->LogMessage(MOJO_LOG_LEVEL_VERBOSE - 1, "Logged at VERBOSE-1 level");
- logger->LogMessage(MOJO_LOG_LEVEL_VERBOSE, "Logged at VERBOSE level");
- logger->LogMessage(MOJO_LOG_LEVEL_INFO, "Logged at INFO level");
- logger->LogMessage(MOJO_LOG_LEVEL_WARNING, "Logged at WARNING level");
- logger->LogMessage(MOJO_LOG_LEVEL_ERROR, "Logged at ERROR level");
-
- // This should kill us:
- EXPECT_DEATH_IF_SUPPORTED(
- { logger->LogMessage(MOJO_LOG_LEVEL_FATAL, "Logged at FATAL level"); },
- "");
-}
-
-TEST(LoggerTest, LogLevels) {
- Environment environment;
- const MojoLogger* const logger = Environment::GetDefaultLogger();
-
- for (MojoLogLevel log_level = MOJO_LOG_LEVEL_VERBOSE - 1;
- log_level <= MOJO_LOG_LEVEL_FATAL + 1;
- log_level++) {
- logger->SetMinimumLogLevel(log_level);
-
- if (log_level <= MOJO_LOG_LEVEL_FATAL)
- EXPECT_EQ(log_level, logger->GetMinimumLogLevel());
- else
- EXPECT_EQ(MOJO_LOG_LEVEL_FATAL, logger->GetMinimumLogLevel());
-
- logger->LogMessage(MOJO_LOG_LEVEL_VERBOSE - 1, "Logged at VERBOSE-1 level");
- logger->LogMessage(MOJO_LOG_LEVEL_VERBOSE, "Logged at VERBOSE level");
- logger->LogMessage(MOJO_LOG_LEVEL_INFO, "Logged at INFO level");
- logger->LogMessage(MOJO_LOG_LEVEL_WARNING, "Logged at WARNING level");
- logger->LogMessage(MOJO_LOG_LEVEL_ERROR, "Logged at ERROR level");
-
- // This should kill us:
- EXPECT_DEATH_IF_SUPPORTED(
- { logger->LogMessage(MOJO_LOG_LEVEL_FATAL, "Logged at FATAL level"); },
- "");
- }
-}
-
-} // namespace
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/environment/tests/async_waiter_unittest.cc ('k') | mojo/public/cpp/environment/tests/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698