diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-12-16 23:34:59 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-12-16 23:34:59 +0000 |
commit | 88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384 (patch) | |
tree | 2ccb8a80d9d1ee12db0de85b03dc9e9ed957b25a /test/gtest_output_test.py | |
parent | 075b76bb96f1b6eac7dde41b47de0dd456b0f473 (diff) | |
download | googletest-88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384.tar.gz googletest-88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384.tar.bz2 googletest-88e97c822c988eaa9f8bcbaa1ea5d702ffd7d384.zip |
Removes uses of GTEST_HAS_STD_STRING.
Diffstat (limited to 'test/gtest_output_test.py')
-rwxr-xr-x | test/gtest_output_test.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/gtest_output_test.py b/test/gtest_output_test.py index c8a38f53..8d9a40b0 100755 --- a/test/gtest_output_test.py +++ b/test/gtest_output_test.py @@ -126,15 +126,15 @@ def RemoveTime(output): def RemoveTestCounts(output): """Removes test counts from a Google Test program's output.""" - output = re.sub(r'\d+ tests, listed below', + output = re.sub(r'\d+ tests?, listed below', '? tests, listed below', output) output = re.sub(r'\d+ FAILED TESTS', '? FAILED TESTS', output) - output = re.sub(r'\d+ tests from \d+ test cases', + output = re.sub(r'\d+ tests? from \d+ test cases?', '? tests from ? test cases', output) - output = re.sub(r'\d+ tests from ([a-zA-Z_])', + output = re.sub(r'\d+ tests? from ([a-zA-Z_])', r'? tests from \1', output) - return re.sub(r'\d+ tests\.', '? tests.', output) + return re.sub(r'\d+ tests?\.', '? tests.', output) def RemoveMatchingTests(test_output, pattern): @@ -268,16 +268,16 @@ class GTestOutputTest(gtest_test_utils.TestCase): normalized_actual = RemoveTestCounts(output) normalized_golden = RemoveTestCounts(self.RemoveUnsupportedTests(golden)) - # This code is very handy when debugging test differences so I left it - # here, commented. - # open(os.path.join( - # gtest_test_utils.GetSourceDir(), - # '_gtest_output_test_normalized_actual.txt'), 'wb').write( - # normalized_actual) - # open(os.path.join( - # gtest_test_utils.GetSourceDir(), - # '_gtest_output_test_normalized_golden.txt'), 'wb').write( - # normalized_golden) + # This code is very handy when debugging golden file differences: + if os.getenv('DEBUG_GTEST_OUTPUT_TEST'): + open(os.path.join( + gtest_test_utils.GetSourceDir(), + '_gtest_output_test_normalized_actual.txt'), 'wb').write( + normalized_actual) + open(os.path.join( + gtest_test_utils.GetSourceDir(), + '_gtest_output_test_normalized_golden.txt'), 'wb').write( + normalized_golden) self.assert_(normalized_golden == normalized_actual) |