Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
logging_unittests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "gtest/gtest.h"
6#include "logging.h"
7
8namespace base {
9namespace testing {
10
13 // return 0; <--- Missing but compiler is fine.
14}
15
18 // return 0; <--- Missing but compiler is fine.
19}
20
21TEST(LoggingTest, UnreachableKillProcess) {
22 ::testing::FLAGS_gtest_death_test_style = "threadsafe";
23 ASSERT_DEATH(KillProcess(), "");
24}
25
26TEST(LoggingTest, UnreachableKillProcessWithMacro) {
27 ::testing::FLAGS_gtest_death_test_style = "threadsafe";
28 ASSERT_DEATH({ BASE_UNREACHABLE(); }, "");
29}
30
31} // namespace testing
32} // namespace base
#define TEST(S, s, D, expected)
int UnreachableScopeWithMacroWithoutReturnDoesNotMakeCompilerMad()
int UnreachableScopeWithoutReturnDoesNotMakeCompilerMad()
void KillProcess()
Definition logging.cc:61
#define BASE_UNREACHABLE()
Definition logging.h:69