Change IsNull and NotNull to use ==/!= nullptr in C++11.
Also update gmock_doctor due to Clang wording change.
This commit is contained in:
@@ -1025,6 +1025,15 @@ TEST(IsNullTest, ReferenceToConstLinkedPtr) {
|
||||
EXPECT_FALSE(m.Matches(non_null_p));
|
||||
}
|
||||
|
||||
#if GTEST_LANG_CXX11
|
||||
TEST(IsNullTest, StdFunction) {
|
||||
const Matcher<std::function<void()>> m = IsNull();
|
||||
|
||||
EXPECT_TRUE(m.Matches(std::function<void()>()));
|
||||
EXPECT_FALSE(m.Matches([]{}));
|
||||
}
|
||||
#endif // GTEST_LANG_CXX11
|
||||
|
||||
TEST(IsNullTest, ReferenceToConstScopedPtr) {
|
||||
const Matcher<const scoped_ptr<double>&> m = IsNull();
|
||||
const scoped_ptr<double> null_p;
|
||||
@@ -1073,6 +1082,15 @@ TEST(NotNullTest, ReferenceToConstLinkedPtr) {
|
||||
EXPECT_TRUE(m.Matches(non_null_p));
|
||||
}
|
||||
|
||||
#if GTEST_LANG_CXX11
|
||||
TEST(NotNullTest, StdFunction) {
|
||||
const Matcher<std::function<void()>> m = NotNull();
|
||||
|
||||
EXPECT_TRUE(m.Matches([]{}));
|
||||
EXPECT_FALSE(m.Matches(std::function<void()>()));
|
||||
}
|
||||
#endif // GTEST_LANG_CXX11
|
||||
|
||||
TEST(NotNullTest, ReferenceToConstScopedPtr) {
|
||||
const Matcher<const scoped_ptr<double>&> m = NotNull();
|
||||
const scoped_ptr<double> null_p;
|
||||
|
||||
Reference in New Issue
Block a user