summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-12-13 17:47:22 (GMT)
committerjueminyang <jueminyang@google.com>2018-12-13 21:00:21 (GMT)
commitc6cb7e033591528a5fe2c63157a0d8ce927740dc (patch)
tree212842474025d7adfa4a2711b74287a3680de45d /googletest/src
parent81f00260668d1124df94eb1266163043882db0ca (diff)
downloadgoogletest-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.cc4
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);