"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "googletest/test/gtest_xml_output_unittest_.cc" between
googletest-release-1.11.0.tar.gz and googletest-release-1.12.0.tar.gz

About: GoogleTest is Google's (unit) testing and mocking framework for C++ tests.

gtest_xml_output_unittest_.cc  (googletest-release-1.11.0):gtest_xml_output_unittest_.cc  (googletest-release-1.12.0)
skipping to change at line 38 skipping to change at line 38
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Unit test for Google Test XML output. // Unit test for Google Test XML output.
// //
// A user can specify XML output in a Google Test program to run via // A user can specify XML output in a Google Test program to run via
// either the GTEST_OUTPUT environment variable or the --gtest_output // either the GTEST_OUTPUT environment variable or the --gtest_output
// flag. This is used for testing such functionality. // flag. This is used for testing such functionality.
// //
// This program will be invoked from a Python unit test. Don't run it // This program will be invoked from a Python unit test. Don't run it
// directly. // directly.
// clang-format off
#include "gtest/gtest.h" #include "gtest/gtest.h"
using ::testing::InitGoogleTest; using ::testing::InitGoogleTest;
using ::testing::Test;
using ::testing::TestEventListeners; using ::testing::TestEventListeners;
using ::testing::TestWithParam; using ::testing::TestWithParam;
using ::testing::UnitTest; using ::testing::UnitTest;
using ::testing::Test;
using ::testing::Values; using ::testing::Values;
class SuccessfulTest : public Test { class SuccessfulTest : public Test {};
};
TEST_F(SuccessfulTest, Succeeds) { TEST_F(SuccessfulTest, Succeeds) {
SUCCEED() << "This is a success."; SUCCEED() << "This is a success.";
ASSERT_EQ(1, 1); ASSERT_EQ(1, 1);
} }
class FailedTest : public Test { class FailedTest : public Test {
}; };
TEST_F(FailedTest, Fails) { TEST_F(FailedTest, Fails) {
skipping to change at line 194 skipping to change at line 194
int main(int argc, char** argv) { int main(int argc, char** argv) {
InitGoogleTest(&argc, argv); InitGoogleTest(&argc, argv);
if (argc > 1 && strcmp(argv[1], "--shut_down_xml") == 0) { if (argc > 1 && strcmp(argv[1], "--shut_down_xml") == 0) {
TestEventListeners& listeners = UnitTest::GetInstance()->listeners(); TestEventListeners& listeners = UnitTest::GetInstance()->listeners();
delete listeners.Release(listeners.default_xml_generator()); delete listeners.Release(listeners.default_xml_generator());
} }
testing::Test::RecordProperty("ad_hoc_property", "42"); testing::Test::RecordProperty("ad_hoc_property", "42");
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
} }
// clang-format on
 End of changes. 5 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)