aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/gtest_env_var_test.py2
-rw-r--r--test/gtest_output_test_.cc2
-rw-r--r--test/gtest_unittest.cc10
3 files changed, 8 insertions, 6 deletions
diff --git a/test/gtest_env_var_test.py b/test/gtest_env_var_test.py
index 92b9cd8a..35e8041f 100755
--- a/test/gtest_env_var_test.py
+++ b/test/gtest_env_var_test.py
@@ -90,7 +90,7 @@ def TestEnvVarAffectsFlag(command):
TestFlag(command, 'color', 'yes', 'auto')
TestFlag(command, 'filter', 'FooTest.Bar', '*')
TestFlag(command, 'output', 'tmp/foo.xml', '')
- TestFlag(command, 'print_time', '1', '0')
+ TestFlag(command, 'print_time', '0', '1')
TestFlag(command, 'repeat', '999', '1')
TestFlag(command, 'throw_on_failure', '1', '0')
TestFlag(command, 'death_test_style', 'threadsafe', 'fast')
diff --git a/test/gtest_output_test_.cc b/test/gtest_output_test_.cc
index a47560be..4d7f0758 100644
--- a/test/gtest_output_test_.cc
+++ b/test/gtest_output_test_.cc
@@ -976,6 +976,8 @@ GTEST_DEFINE_bool_(internal_skip_environment_and_ad_hoc_tests, false,
// of them are intended to fail), and then compare the test results
// with the "golden" file.
int main(int argc, char **argv) {
+ testing::GTEST_FLAG(print_time) = false;
+
// We just run the tests, knowing some of them are intended to fail.
// We will use a separate Python script to compare the output of
// this program with the golden file.
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index d1c517b5..0786725b 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -1204,7 +1204,7 @@ class GTestFlagSaverTest : public Test {
GTEST_FLAG(filter) = "";
GTEST_FLAG(list_tests) = false;
GTEST_FLAG(output) = "";
- GTEST_FLAG(print_time) = false;
+ GTEST_FLAG(print_time) = true;
GTEST_FLAG(repeat) = 1;
GTEST_FLAG(throw_on_failure) = false;
}
@@ -1227,7 +1227,7 @@ class GTestFlagSaverTest : public Test {
EXPECT_STREQ("", GTEST_FLAG(filter).c_str());
EXPECT_FALSE(GTEST_FLAG(list_tests));
EXPECT_STREQ("", GTEST_FLAG(output).c_str());
- EXPECT_FALSE(GTEST_FLAG(print_time));
+ EXPECT_TRUE(GTEST_FLAG(print_time));
EXPECT_EQ(1, GTEST_FLAG(repeat));
EXPECT_FALSE(GTEST_FLAG(throw_on_failure));
@@ -1239,7 +1239,7 @@ class GTestFlagSaverTest : public Test {
GTEST_FLAG(filter) = "abc";
GTEST_FLAG(list_tests) = true;
GTEST_FLAG(output) = "xml:foo.xml";
- GTEST_FLAG(print_time) = true;
+ GTEST_FLAG(print_time) = false;
GTEST_FLAG(repeat) = 100;
GTEST_FLAG(throw_on_failure) = true;
}
@@ -4325,7 +4325,7 @@ struct Flags {
filter(""),
list_tests(false),
output(""),
- print_time(false),
+ print_time(true),
repeat(1),
throw_on_failure(false) {}
@@ -4436,7 +4436,7 @@ class InitGoogleTestTest : public Test {
GTEST_FLAG(filter) = "";
GTEST_FLAG(list_tests) = false;
GTEST_FLAG(output) = "";
- GTEST_FLAG(print_time) = false;
+ GTEST_FLAG(print_time) = true;
GTEST_FLAG(repeat) = 1;
GTEST_FLAG(throw_on_failure) = false;
}