aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-nice-strict_test.cc
diff options
context:
space:
mode:
authorJerry Turcios <jerryturcios08@gmail.com>2018-10-23 20:57:38 -0400
committerJerry Turcios <jerryturcios08@gmail.com>2018-10-23 20:57:38 -0400
commit6e37201260b135d76f56af63589fd2b1c50a1ed3 (patch)
tree628fb56b74b238298bde9f4c5cc6ee7654088c99 /googlemock/test/gmock-nice-strict_test.cc
parent3468af9b36e7160aafc8b3952b2721dc9d1abd95 (diff)
parent7b6b3be34241dfa9fdfd53797734bdc18683c50b (diff)
downloadgoogletest-6e37201260b135d76f56af63589fd2b1c50a1ed3.tar.gz
googletest-6e37201260b135d76f56af63589fd2b1c50a1ed3.tar.bz2
googletest-6e37201260b135d76f56af63589fd2b1c50a1ed3.zip
Merge branch 'master' of https://github.com/google/googletest
Diffstat (limited to 'googlemock/test/gmock-nice-strict_test.cc')
-rw-r--r--googlemock/test/gmock-nice-strict_test.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc
index dce66423..d00f4536 100644
--- a/googlemock/test/gmock-nice-strict_test.cc
+++ b/googlemock/test/gmock-nice-strict_test.cc
@@ -184,6 +184,13 @@ TEST(RawMockTest, InfoForUninterestingCall) {
GMOCK_FLAG(verbose) = saved_flag;
}
+TEST(RawMockTest, IsNaggy_IsNice_IsStrict) {
+ MockFoo raw_foo;
+ EXPECT_TRUE(Mock::IsNaggy(&raw_foo));
+ EXPECT_FALSE(Mock::IsNice(&raw_foo));
+ EXPECT_FALSE(Mock::IsStrict(&raw_foo));
+}
+
// Tests that a nice mock generates no warning for uninteresting calls.
TEST(NiceMockTest, NoWarningForUninterestingCall) {
NiceMock<MockFoo> nice_foo;
@@ -309,6 +316,13 @@ TEST(NiceMockTest, AcceptsClassNamedMock) {
}
#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
+TEST(NiceMockTest, IsNaggy_IsNice_IsStrict) {
+ NiceMock<MockFoo> nice_foo;
+ EXPECT_FALSE(Mock::IsNaggy(&nice_foo));
+ EXPECT_TRUE(Mock::IsNice(&nice_foo));
+ EXPECT_FALSE(Mock::IsStrict(&nice_foo));
+}
+
#if GTEST_HAS_STREAM_REDIRECTION
// Tests that a naggy mock generates warnings for uninteresting calls.
@@ -417,6 +431,13 @@ TEST(NaggyMockTest, AcceptsClassNamedMock) {
}
#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
+TEST(NaggyMockTest, IsNaggy_IsNice_IsStrict) {
+ NaggyMock<MockFoo> naggy_foo;
+ EXPECT_TRUE(Mock::IsNaggy(&naggy_foo));
+ EXPECT_FALSE(Mock::IsNice(&naggy_foo));
+ EXPECT_FALSE(Mock::IsStrict(&naggy_foo));
+}
+
// Tests that a strict mock allows expected calls.
TEST(StrictMockTest, AllowsExpectedCall) {
StrictMock<MockFoo> strict_foo;
@@ -506,5 +527,12 @@ TEST(StrictMockTest, AcceptsClassNamedMock) {
}
#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
+TEST(StrictMockTest, IsNaggy_IsNice_IsStrict) {
+ StrictMock<MockFoo> strict_foo;
+ EXPECT_FALSE(Mock::IsNaggy(&strict_foo));
+ EXPECT_FALSE(Mock::IsNice(&strict_foo));
+ EXPECT_TRUE(Mock::IsStrict(&strict_foo));
+}
+
} // namespace gmock_nice_strict_test
} // namespace testing