diff options
author | Abseil Team <absl-team@google.com> | 2018-12-13 17:47:22 (GMT) |
---|---|---|
committer | jueminyang <jueminyang@google.com> | 2018-12-13 21:00:21 (GMT) |
commit | c6cb7e033591528a5fe2c63157a0d8ce927740dc (patch) | |
tree | 212842474025d7adfa4a2711b74287a3680de45d /googletest/src | |
parent | 81f00260668d1124df94eb1266163043882db0ca (diff) | |
download | googletest-c6cb7e033591528a5fe2c63157a0d8ce927740dc.zip googletest-c6cb7e033591528a5fe2c63157a0d8ce927740dc.tar.gz googletest-c6cb7e033591528a5fe2c63157a0d8ce927740dc.tar.bz2 |
Googletest export
Support skipped in XML and JSON output
PiperOrigin-RevId: 225386540
Diffstat (limited to 'googletest/src')
-rw-r--r-- | googletest/src/gtest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index db90fe6..34641af 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -3761,7 +3761,8 @@ void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, } OutputXmlAttribute(stream, kTestcase, "status", - test_info.should_run() ? "run" : "notrun"); + result.Skipped() ? "skipped" : + test_info.should_run() ? "run" : "notrun"); OutputXmlAttribute(stream, kTestcase, "time", FormatTimeInMillisAsSeconds(result.elapsed_time())); OutputXmlAttribute(stream, kTestcase, "classname", test_case_name); @@ -4126,6 +4127,7 @@ void JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream, } OutputJsonKey(stream, kTestcase, "status", + result.Skipped() ? "SKIPPED" : test_info.should_run() ? "RUN" : "NOTRUN", kIndent); OutputJsonKey(stream, kTestcase, "time", FormatTimeInMillisAsDuration(result.elapsed_time()), kIndent); |