gmock_link_test.h (googletest-release-1.10.0) | : | gmock_link_test.h (googletest-release-1.11.0) | ||
---|---|---|---|---|
skipping to change at line 114 | skipping to change at line 114 | |||
// This test requires identical definitions of Interface and Mock to be | // This test requires identical definitions of Interface and Mock to be | |||
// included in different translation units. We achieve this by writing | // included in different translation units. We achieve this by writing | |||
// them in this header and #including it in gmock_link_test.cc and | // them in this header and #including it in gmock_link_test.cc and | |||
// gmock_link2_test.cc. Because the symbols generated by the compiler for | // gmock_link2_test.cc. Because the symbols generated by the compiler for | |||
// those constructs must be identical in both translation units, | // those constructs must be identical in both translation units, | |||
// definitions of Interface and Mock tests MUST be kept in the SAME | // definitions of Interface and Mock tests MUST be kept in the SAME | |||
// NON-ANONYMOUS namespace in this file. The test fixture class LinkTest | // NON-ANONYMOUS namespace in this file. The test fixture class LinkTest | |||
// is defined as LinkTest1 in gmock_link_test.cc and as LinkTest2 in | // is defined as LinkTest1 in gmock_link_test.cc and as LinkTest2 in | |||
// gmock_link2_test.cc to avoid producing linker errors. | // gmock_link2_test.cc to avoid producing linker errors. | |||
#ifndef GMOCK_TEST_GMOCK_LINK_TEST_H_ | #ifndef GOOGLEMOCK_TEST_GMOCK_LINK_TEST_H_ | |||
#define GMOCK_TEST_GMOCK_LINK_TEST_H_ | #define GOOGLEMOCK_TEST_GMOCK_LINK_TEST_H_ | |||
#include "gmock/gmock.h" | #include "gmock/gmock.h" | |||
#if !GTEST_OS_WINDOWS_MOBILE | #if !GTEST_OS_WINDOWS_MOBILE | |||
# include <errno.h> | # include <errno.h> | |||
#endif | #endif | |||
#include <iostream> | #include <iostream> | |||
#include <vector> | #include <vector> | |||
skipping to change at line 689 | skipping to change at line 689 | |||
Matcher<int> m = Not(_); | Matcher<int> m = Not(_); | |||
EXPECT_FALSE(m.Matches(1)); | EXPECT_FALSE(m.Matches(1)); | |||
} | } | |||
// Tests the linkage of the MatcherCast<T>() function. | // Tests the linkage of the MatcherCast<T>() function. | |||
TEST(LinkTest, TestMatcherCast) { | TEST(LinkTest, TestMatcherCast) { | |||
Matcher<const char*> m = MatcherCast<const char*>(_); | Matcher<const char*> m = MatcherCast<const char*>(_); | |||
EXPECT_TRUE(m.Matches(nullptr)); | EXPECT_TRUE(m.Matches(nullptr)); | |||
} | } | |||
#endif // GMOCK_TEST_GMOCK_LINK_TEST_H_ | #endif // GOOGLEMOCK_TEST_GMOCK_LINK_TEST_H_ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |