Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
38e1f9ab
Commit
38e1f9ab
authored
Nov 20, 2008
by
shiqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves a code block in gtest.cc to mirror the change in the Google internal version of gtest.
parent
3d704217
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
gtest.cc
src/gtest.cc
+21
-21
No files found.
src/gtest.cc
View file @
38e1f9ab
...
...
@@ -3717,6 +3717,27 @@ TestInfoImpl::~TestInfoImpl() {
delete
factory_
;
}
// Returns the current OS stack trace as a String.
//
// The maximum number of stack frames to be included is specified by
// the gtest_stack_trace_depth flag. The skip_count parameter
// specifies the number of top frames to be skipped, which doesn't
// count against the number of frames to be included.
//
// For example, if Foo() calls Bar(), which in turn calls
// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
String
GetCurrentOsStackTraceExceptTop
(
UnitTest
*
unit_test
,
int
skip_count
)
{
// We pass skip_count + 1 to skip this wrapper function in addition
// to what the user really wants to skip.
return
unit_test
->
impl
()
->
CurrentOsStackTraceExceptTop
(
skip_count
+
1
);
}
// Returns the number of failed test parts in the given test result object.
int
GetFailedPartCount
(
const
TestResult
*
result
)
{
return
result
->
failed_part_count
();
}
// Parses a string as a command line flag. The string should have
// the format "--flag=value". When def_optional is true, the "=value"
// part can be omitted.
...
...
@@ -3864,27 +3885,6 @@ void InitGoogleTestImpl(int* argc, CharType** argv) {
}
}
// Returns the current OS stack trace as a String.
//
// The maximum number of stack frames to be included is specified by
// the gtest_stack_trace_depth flag. The skip_count parameter
// specifies the number of top frames to be skipped, which doesn't
// count against the number of frames to be included.
//
// For example, if Foo() calls Bar(), which in turn calls
// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
String
GetCurrentOsStackTraceExceptTop
(
UnitTest
*
unit_test
,
int
skip_count
)
{
// We pass skip_count + 1 to skip this wrapper function in addition
// to what the user really wants to skip.
return
unit_test
->
impl
()
->
CurrentOsStackTraceExceptTop
(
skip_count
+
1
);
}
// Returns the number of failed test parts in the given test result object.
int
GetFailedPartCount
(
const
TestResult
*
result
)
{
return
result
->
failed_part_count
();
}
}
// namespace internal
// Initializes Google Test. This must be called before calling
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment