summaryrefslogtreecommitdiffstats
path: root/googletest/test/gtest_unittest.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-09-01 14:31:00 (GMT)
committerMark Barolak <mbar@google.com>2020-09-01 20:53:36 (GMT)
commitaf1e75ce0b3429d70790c049d8dbb0aae3e2480f (patch)
tree6be4a0da588dcffe1f27024dd76470ccc4277e91 /googletest/test/gtest_unittest.cc
parentdf6b75949b1efab7606ba60c0f0a0125ac95c5af (diff)
downloadgoogletest-af1e75ce0b3429d70790c049d8dbb0aae3e2480f.zip
googletest-af1e75ce0b3429d70790c049d8dbb0aae3e2480f.tar.gz
googletest-af1e75ce0b3429d70790c049d8dbb0aae3e2480f.tar.bz2
Googletest export
Add millisecond precision to start timestamp in XML/JSON output - Previous timestamp had format YYYY-MM-DDThh:mm:ss, now YYYY-MM-DDThh:mm:ss.sss - This conforms to the ISO 8601 standard PiperOrigin-RevId: 329503623
Diffstat (limited to 'googletest/test/gtest_unittest.cc')
-rw-r--r--googletest/test/gtest_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index d7fb048..4df9124 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -485,28 +485,28 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test {
const TimeInMillis FormatEpochTimeInMillisAsIso8601Test::kMillisPerSec;
TEST_F(FormatEpochTimeInMillisAsIso8601Test, PrintsTwoDigitSegments) {
- EXPECT_EQ("2011-10-31T18:52:42",
+ EXPECT_EQ("2011-10-31T18:52:42.000",
FormatEpochTimeInMillisAsIso8601(1320087162 * kMillisPerSec));
}
-TEST_F(FormatEpochTimeInMillisAsIso8601Test, MillisecondsDoNotAffectResult) {
+TEST_F(FormatEpochTimeInMillisAsIso8601Test, IncludesMillisecondsAfterDot) {
EXPECT_EQ(
- "2011-10-31T18:52:42",
+ "2011-10-31T18:52:42.234",
FormatEpochTimeInMillisAsIso8601(1320087162 * kMillisPerSec + 234));
}
TEST_F(FormatEpochTimeInMillisAsIso8601Test, PrintsLeadingZeroes) {
- EXPECT_EQ("2011-09-03T05:07:02",
+ EXPECT_EQ("2011-09-03T05:07:02.000",
FormatEpochTimeInMillisAsIso8601(1315026422 * kMillisPerSec));
}
TEST_F(FormatEpochTimeInMillisAsIso8601Test, Prints24HourTime) {
- EXPECT_EQ("2011-09-28T17:08:22",
+ EXPECT_EQ("2011-09-28T17:08:22.000",
FormatEpochTimeInMillisAsIso8601(1317229702 * kMillisPerSec));
}
TEST_F(FormatEpochTimeInMillisAsIso8601Test, PrintsEpochStart) {
- EXPECT_EQ("1970-01-01T00:00:00", FormatEpochTimeInMillisAsIso8601(0));
+ EXPECT_EQ("1970-01-01T00:00:00.000", FormatEpochTimeInMillisAsIso8601(0));
}
# ifdef __BORLANDC__