summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-11-20 04:56:21 +0000
committershiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-11-20 04:56:21 +0000
commiteb2553da147998571f28fc03f7731a3ea44efa22 (patch)
tree62e5658b72ca72c12562ce127bc5e6d285088270
parentf904a612d9444ab36c07a8e619c113432e046f49 (diff)
downloadgoogletest-eb2553da147998571f28fc03f7731a3ea44efa22.tar.gz
Moves a code block in gtest.cc to mirror the change in the Google internal version of gtest.
git-svn-id: http://googletest.googlecode.com/svn/trunk@124 861a406c-534a-0410-8894-cb66d6ee9925
-rw-r--r--src/gtest.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/gtest.cc b/src/gtest.cc
index 8370830..4a67b7a 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -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