"Fossies" - the Fresh Open Source Software Archive  

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

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

gtest_xml_output_unittest_.cc  (googletest-release-1.10.0):gtest_xml_output_unittest_.cc  (googletest-release-1.11.0)
skipping to change at line 77 skipping to change at line 77
FAIL() << "Unexpected failure: Disabled test should not be run"; FAIL() << "Unexpected failure: Disabled test should not be run";
} }
class SkippedTest : public Test { class SkippedTest : public Test {
}; };
TEST_F(SkippedTest, Skipped) { TEST_F(SkippedTest, Skipped) {
GTEST_SKIP(); 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) { TEST(MixedResultTest, Succeeds) {
EXPECT_EQ(1, 1); EXPECT_EQ(1, 1);
ASSERT_EQ(1, 1); ASSERT_EQ(1, 1);
} }
TEST(MixedResultTest, Fails) { TEST(MixedResultTest, Fails) {
EXPECT_EQ(1, 2); EXPECT_EQ(1, 2);
ASSERT_EQ(2, 3); ASSERT_EQ(2, 3);
} }
skipping to change at line 157 skipping to change at line 166
ExternalUtilityThatCallsRecordProperty("key_for_utility_string", "1"); ExternalUtilityThatCallsRecordProperty("key_for_utility_string", "1");
} }
// Verifies that the test parameter value is output in the 'value_param' // Verifies that the test parameter value is output in the 'value_param'
// XML attribute for value-parameterized tests. // XML attribute for value-parameterized tests.
class ValueParamTest : public TestWithParam<int> {}; class ValueParamTest : public TestWithParam<int> {};
TEST_P(ValueParamTest, HasValueParamAttribute) {} TEST_P(ValueParamTest, HasValueParamAttribute) {}
TEST_P(ValueParamTest, AnotherTestThatHasValueParamAttribute) {} TEST_P(ValueParamTest, AnotherTestThatHasValueParamAttribute) {}
INSTANTIATE_TEST_SUITE_P(Single, ValueParamTest, Values(33, 42)); INSTANTIATE_TEST_SUITE_P(Single, ValueParamTest, Values(33, 42));
#if GTEST_HAS_TYPED_TEST
// Verifies that the type parameter name is output in the 'type_param' // Verifies that the type parameter name is output in the 'type_param'
// XML attribute for typed tests. // XML attribute for typed tests.
template <typename T> class TypedTest : public Test {}; template <typename T> class TypedTest : public Test {};
typedef testing::Types<int, long> TypedTestTypes; typedef testing::Types<int, long> TypedTestTypes;
TYPED_TEST_SUITE(TypedTest, TypedTestTypes); TYPED_TEST_SUITE(TypedTest, TypedTestTypes);
TYPED_TEST(TypedTest, HasTypeParamAttribute) {} TYPED_TEST(TypedTest, HasTypeParamAttribute) {}
#endif
#if GTEST_HAS_TYPED_TEST_P
// Verifies that the type parameter name is output in the 'type_param' // Verifies that the type parameter name is output in the 'type_param'
// XML attribute for type-parameterized tests. // XML attribute for type-parameterized tests.
template <typename T> template <typename T>
class TypeParameterizedTestSuite : public Test {}; class TypeParameterizedTestSuite : public Test {};
TYPED_TEST_SUITE_P(TypeParameterizedTestSuite); TYPED_TEST_SUITE_P(TypeParameterizedTestSuite);
TYPED_TEST_P(TypeParameterizedTestSuite, HasTypeParamAttribute) {} TYPED_TEST_P(TypeParameterizedTestSuite, HasTypeParamAttribute) {}
REGISTER_TYPED_TEST_SUITE_P(TypeParameterizedTestSuite, HasTypeParamAttribute); REGISTER_TYPED_TEST_SUITE_P(TypeParameterizedTestSuite, HasTypeParamAttribute);
typedef testing::Types<int, long> TypeParameterizedTestSuiteTypes; // NOLINT typedef testing::Types<int, long> TypeParameterizedTestSuiteTypes; // NOLINT
INSTANTIATE_TYPED_TEST_SUITE_P(Single, TypeParameterizedTestSuite, INSTANTIATE_TYPED_TEST_SUITE_P(Single, TypeParameterizedTestSuite,
TypeParameterizedTestSuiteTypes); TypeParameterizedTestSuiteTypes);
#endif
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();
 End of changes. 5 change blocks. 
4 lines changed or deleted 9 lines changed or added

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