Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
test
core
util
stack_tracer_test.cc
Go to the documentation of this file.
1
/*
2
*
3
* Copyright 2020 the gRPC authors.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
#include "
test/core/util/stack_tracer.h
"
20
21
#include <string>
22
23
#include <gtest/gtest.h>
24
25
#include "absl/debugging/symbolize.h"
26
#include "absl/strings/match.h"
27
28
#include <
grpc/support/log.h
>
29
30
#include "
test/core/util/test_config.h
"
31
32
TEST
(StackTracerTest, Basic) {
33
std::string
stack_trace =
grpc_core::testing::GetCurrentStackTrace
();
34
gpr_log
(
GPR_INFO
,
"stack_trace=%s"
, stack_trace.c_str());
35
#if !defined(NDEBUG) && !defined(GPR_MUSL_LIBC_COMPAT)
36
EXPECT_TRUE
(
absl::StrContains
(stack_trace,
"Basic"
));
37
#endif
38
}
39
40
int
main
(
int
argc,
char
** argv) {
41
grpc::testing::TestEnvironment
env
(&argc, argv);
42
testing::InitGoogleTest
(&argc, argv);
43
int
ret
=
RUN_ALL_TESTS
();
44
return
ret
;
45
}
GPR_INFO
#define GPR_INFO
Definition:
include/grpc/impl/codegen/log.h:56
log.h
generate.env
env
Definition:
generate.py:37
testing::internal::string
::std::string string
Definition:
bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
TEST
TEST(StackTracerTest, Basic)
Definition:
stack_tracer_test.cc:32
stack_tracer.h
main
int main(int argc, char **argv)
Definition:
stack_tracer_test.cc:40
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
absl::StrContains
ABSL_NAMESPACE_BEGIN bool StrContains(absl::string_view haystack, absl::string_view needle) noexcept
Definition:
third_party/abseil-cpp/absl/strings/match.h:46
RUN_ALL_TESTS
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition:
bloaty/third_party/googletest/googletest/include/gtest/gtest.h:2471
test_config.h
testing::InitGoogleTest
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition:
bloaty/third_party/googletest/googletest/src/gtest.cc:6106
ret
UniquePtr< SSL_SESSION > ret
Definition:
ssl_x509.cc:1029
grpc::testing::TestEnvironment
Definition:
test/core/util/test_config.h:54
grpc_core::testing::GetCurrentStackTrace
std::string GetCurrentStackTrace()
Definition:
stack_tracer.cc:93
EXPECT_TRUE
#define EXPECT_TRUE(condition)
Definition:
bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1967
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:21