diff options
author | Mario Voorsluys <mvoorsluys@lely.com> | 2020-03-26 18:16:43 (GMT) |
---|---|---|
committer | Mario Voorsluys <mvoorsluys@lely.com> | 2020-03-26 18:17:20 (GMT) |
commit | c447b2166b6f72af037cad2113f5bd489f52db53 (patch) | |
tree | eb63341fd2c2b494189ee021501bc1bb4e22409d /googletest/test/gtest_xml_output_unittest_.cc | |
parent | 23dadb8472d9a124394d9d77a659d565e5ea2d93 (diff) | |
download | googletest-c447b2166b6f72af037cad2113f5bd489f52db53.zip googletest-c447b2166b6f72af037cad2113f5bd489f52db53.tar.gz googletest-c447b2166b6f72af037cad2113f5bd489f52db53.tar.bz2 |
Fixed xml unit-tests and added extra tests
The extra tests check that the xml output is correct when a failure occurs before skipping, and that the right skip message is added to the file.
The json file had to be fixed because it's the same executable.
Diffstat (limited to 'googletest/test/gtest_xml_output_unittest_.cc')
-rw-r--r-- | googletest/test/gtest_xml_output_unittest_.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/googletest/test/gtest_xml_output_unittest_.cc b/googletest/test/gtest_xml_output_unittest_.cc index c95fd66..2b6634b 100644 --- a/googletest/test/gtest_xml_output_unittest_.cc +++ b/googletest/test/gtest_xml_output_unittest_.cc @@ -74,6 +74,15 @@ TEST_F(SkippedTest, Skipped) { GTEST_SKIP(); } +TEST_F(SkippedTest, SkippedWithMessage) { + GTEST_SKIP() << "It is good practice to tell why you skip a test."; +} + +TEST_F(SkippedTest, SkippedAfterFailure) { + EXPECT_EQ(1, 2); + GTEST_SKIP() << "It is good practice to tell why you skip a test."; +} + TEST(MixedResultTest, Succeeds) { EXPECT_EQ(1, 1); ASSERT_EQ(1, 1); |