diff options
author | Abseil Team <absl-team@google.com> | 2023-02-02 15:14:30 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-02-02 15:15:23 (GMT) |
commit | 6f21175f57afa370a707026fcaf246eb081d1639 (patch) | |
tree | f527314d4fde58f4113c0bfc5dbebaf73186ab8e /googletest/test/gtest_xml_test_utils.py | |
parent | ebedaa18c7cafa15f06ab3d814440e510fad9559 (diff) | |
download | googletest-6f21175f57afa370a707026fcaf246eb081d1639.zip googletest-6f21175f57afa370a707026fcaf246eb081d1639.tar.gz googletest-6f21175f57afa370a707026fcaf246eb081d1639.tar.bz2 |
Add a trailing decimal point to FormatTimeInMillisAsSeconds() output when input
is an exact N seconds.
PiperOrigin-RevId: 506610898
Change-Id: Idcd705c719e0e721148c350c8a14f27b9eb5c4f7
Diffstat (limited to 'googletest/test/gtest_xml_test_utils.py')
-rwxr-xr-x | googletest/test/gtest_xml_test_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/test/gtest_xml_test_utils.py b/googletest/test/gtest_xml_test_utils.py index caa77b5..8fcb693 100755 --- a/googletest/test/gtest_xml_test_utils.py +++ b/googletest/test/gtest_xml_test_utils.py @@ -218,7 +218,9 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): ) if element.tagName in ('testsuites', 'testsuite', 'testcase'): time = element.getAttributeNode('time') - time.value = re.sub(r'^\d+(\.\d+)?$', '*', time.value) + # The value for exact N seconds has a traling decimal point (e.g., "10." + # instead of "10") + time.value = re.sub(r'^\d+\.(\d+)?$', '*', time.value) type_param = element.getAttributeNode('type_param') if type_param and type_param.value: type_param.value = '*' |