Flutter Engine
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 "flutter/fml/logging.h"
6 #include "gtest/gtest.h"
7 
8 namespace fml {
9 namespace testing {
10 
12  KillProcess();
13  // return 0; <--- Missing but compiler is fine.
14 }
15 
18  // return 0; <--- Missing but compiler is fine.
19 }
20 
21 TEST(LoggingTest, UnreachableKillProcess) {
22  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
23  ASSERT_DEATH(KillProcess(), "");
24 }
25 
26 TEST(LoggingTest, UnreachableKillProcessWithMacro) {
27  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
28  ASSERT_DEATH({ FML_UNREACHABLE(); }, "");
29 }
30 
31 } // namespace testing
32 } // namespace fml
Definition: ascii_trie.cc:9
int UnreachableScopeWithMacroWithoutReturnDoesNotMakeCompilerMad()
TEST(BacktraceTest, CanGatherBacktrace)
int UnreachableScopeWithoutReturnDoesNotMakeCompilerMad()
void KillProcess()
Definition: logging.cc:108
#define FML_UNREACHABLE()
Definition: logging.h:92