summaryrefslogtreecommitdiffstats
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-07-14 22:56:46 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-07-14 22:56:46 (GMT)
commit8bdb31e0540c46de485b362178f60e8bb947ff43 (patch)
tree439e910bb34bbb3856fc471122220c1fff16ed5f /include/gtest/gtest.h
parent89080477aee9bd91536c9fb47bc31c62ea7d75bb (diff)
downloadgoogletest-8bdb31e0540c46de485b362178f60e8bb947ff43.zip
googletest-8bdb31e0540c46de485b362178f60e8bb947ff43.tar.gz
googletest-8bdb31e0540c46de485b362178f60e8bb947ff43.tar.bz2
Adds the command line flags needed for test shuffling. Most code by Josh Kelley.
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h
index 5db7c18..d6673d1 100644
--- a/include/gtest/gtest.h
+++ b/include/gtest/gtest.h
@@ -119,6 +119,9 @@ GTEST_DECLARE_string_(output);
// test.
GTEST_DECLARE_bool_(print_time);
+// This flag specifies the random number seed.
+GTEST_DECLARE_int32_(random_seed);
+
// This flag sets how many times the tests are repeated. The default value
// is 1. If the value is -1 the tests are repeating forever.
GTEST_DECLARE_int32_(repeat);
@@ -127,6 +130,9 @@ GTEST_DECLARE_int32_(repeat);
// stack frames in failure stack traces.
GTEST_DECLARE_bool_(show_internal_stack_frames);
+// When this flag is specified, tests' order is randomized on every run.
+GTEST_DECLARE_bool_(shuffle);
+
// This flag specifies the maximum number of stack frames to be
// printed in a failure message.
GTEST_DECLARE_int32_(stack_trace_depth);
@@ -798,6 +804,9 @@ class UnitTest {
// or NULL if no test is running.
const TestInfo* current_test_info() const;
+ // Returns the random seed used at the start of the current test run.
+ int random_seed() const;
+
#if GTEST_HAS_PARAM_TEST
// Returns the ParameterizedTestCaseRegistry object used to keep track of
// value-parameterized tests and instantiate and register them.