Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
accessibility
base
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
8
namespace
base
{
9
namespace
testing {
10
11
int
UnreachableScopeWithoutReturnDoesNotMakeCompilerMad
() {
12
KillProcess
();
13
// return 0; <--- Missing but compiler is fine.
14
}
15
16
int
UnreachableScopeWithMacroWithoutReturnDoesNotMakeCompilerMad
() {
17
BASE_UNREACHABLE
();
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({
BASE_UNREACHABLE
(); },
""
);
29
}
30
31
}
// namespace testing
32
}
// namespace base
TEST
#define TEST(S, s, D, expected)
Definition
FitsInTest.cpp:15
base::testing::UnreachableScopeWithMacroWithoutReturnDoesNotMakeCompilerMad
int UnreachableScopeWithMacroWithoutReturnDoesNotMakeCompilerMad()
Definition
logging_unittests.cc:16
base::testing::UnreachableScopeWithoutReturnDoesNotMakeCompilerMad
int UnreachableScopeWithoutReturnDoesNotMakeCompilerMad()
Definition
logging_unittests.cc:11
base
Definition
ax_tree_id_registry.h:17
base::KillProcess
void KillProcess()
Definition
logging.cc:61
logging.h
BASE_UNREACHABLE
#define BASE_UNREACHABLE()
Definition
logging.h:69
Generated on Fri Apr 26 2024 06:14:05 for Flutter Engine by
1.9.8