Googletest export

Move the Matcher<T> interface to googletest so I can use it to extend death test regex matching in a subsequent change.

PiperOrigin-RevId: 221675910
This commit is contained in:
durandal
2018-11-15 16:09:09 -05:00
committed by Gennadiy Civil
parent aac18185eb
commit 8e86f67261
7 changed files with 842 additions and 717 deletions

View File

@@ -499,6 +499,10 @@ TEST_F(TestForDeathTest, AcceptsAnythingConvertibleToRE) {
const ::string regex_str(regex_c_str);
EXPECT_DEATH(GlobalFunction(), regex_str);
// This one is tricky; a temporary pointer into another temporary. Reference
// lifetime extension of the pointer is not sufficient.
EXPECT_DEATH(GlobalFunction(), ::string(regex_c_str).c_str());
# endif // GTEST_HAS_GLOBAL_STRING
# if !GTEST_USES_PCRE
@@ -506,6 +510,10 @@ TEST_F(TestForDeathTest, AcceptsAnythingConvertibleToRE) {
const ::std::string regex_std_str(regex_c_str);
EXPECT_DEATH(GlobalFunction(), regex_std_str);
// This one is tricky; a temporary pointer into another temporary. Reference
// lifetime extension of the pointer is not sufficient.
EXPECT_DEATH(GlobalFunction(), ::std::string(regex_c_str).c_str());
# endif // !GTEST_USES_PCRE
}