Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
b3ed14ac
Commit
b3ed14ac
authored
Feb 28, 2013
by
zhanyong.wan
Browse files
Implements RUN_ALL_TESTS() as a function.
parent
1b89db97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
include/gtest/gtest.h
include/gtest/gtest.h
+10
-5
No files found.
include/gtest/gtest.h
View file @
b3ed14ac
...
...
@@ -2227,15 +2227,20 @@ bool StaticAssertTypeEq() {
GTEST_TEST_(test_fixture, test_name, test_fixture, \
::testing::internal::GetTypeId<test_fixture>())
// Use this macro in main() to run all tests. It returns 0 if all
}
// namespace testing
// Use this function in main() to run all tests. It returns 0 if all
// tests are successful, or 1 otherwise.
//
// RUN_ALL_TESTS() should be invoked after the command line has been
// parsed by InitGoogleTest().
//
// This function was formerly a macro; thus, it is in the global
// namespace and has an all-caps name.
int
RUN_ALL_TESTS
()
GTEST_MUST_USE_RESULT_
;
#define RUN_ALL_TESTS()\
(::testing::UnitTest::GetInstance()->Run())
}
// namespace testing
inline
int
RUN_ALL_TESTS
()
{
return
::
testing
::
UnitTest
::
GetInstance
()
->
Run
();
}
#endif // GTEST_INCLUDE_GTEST_GTEST_H_
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