Searched refs:mock_foo (Results 1 – 7 of 7) sorted by relevance
/third_party/googletest/googlemock/test/ |
D | gmock-function-mocker_test.cc | 456 MockFoo mock_foo; in TEST() local 458 EXPECT_CALL(mock_foo, RefQualifiedConstRef).WillOnce(Return(1)); in TEST() 459 EXPECT_CALL(std::move(mock_foo), // NOLINT in TEST() 462 EXPECT_CALL(mock_foo, RefQualifiedRef).WillOnce(Return(3)); in TEST() 463 EXPECT_CALL(std::move(mock_foo), // NOLINT in TEST() 467 EXPECT_CALL(static_cast<const MockFoo&>(mock_foo), RefQualifiedOverloaded()) in TEST() 469 EXPECT_CALL(static_cast<const MockFoo&&>(mock_foo), RefQualifiedOverloaded()) in TEST() 471 EXPECT_CALL(static_cast<MockFoo&>(mock_foo), RefQualifiedOverloaded()) in TEST() 473 EXPECT_CALL(static_cast<MockFoo&&>(mock_foo), RefQualifiedOverloaded()) in TEST() 476 EXPECT_EQ(mock_foo.RefQualifiedConstRef(), 1); in TEST() [all …]
|
D | gmock_stress_test.cc | 95 MockFoo* mock_foo; member 101 const char ch = param.mock_foo->Baz("a", "b"); in Helper1() 111 EXPECT_EQ('\0', param.mock_foo->Baz("x", "y")) << "Expected failure."; in Helper1() 114 EXPECT_EQ(1, param.mock_foo->Bar(5)); in Helper1()
|
/third_party/python/Doc/library/ |
D | unittest.mock-examples.rst | 646 >>> mock_foo = MagicMock() 647 >>> mock_foo.iter.return_value = iter([1, 2, 3]) 648 >>> list(mock_foo.iter()) 692 ... self.mock_foo = self.patcher.start() 695 ... self.assertIs(mymodule.foo, self.mock_foo) 711 ... self.mock_foo = patcher.start() 714 ... self.assertIs(mymodule.foo, self.mock_foo) 746 >>> with patch.object(Foo, 'foo', autospec=True) as mock_foo: 747 ... mock_foo.return_value = 'foo' 752 >>> mock_foo.assert_called_once_with(foo) [all …]
|
D | unittest.mock.rst | 837 >>> with patch('__main__.Foo.foo', new_callable=PropertyMock) as mock_foo: 838 ... mock_foo.return_value = 'mockity-mock' 844 >>> mock_foo.mock_calls
|
/third_party/python/Lib/unittest/test/testmock/ |
D | testpatch.py | 1196 def _test(self, mock_foo): argument 1198 test.assertIs(Foo, mock_foo) 1201 def test_two(self, mock_foo): argument 1202 self._test(mock_foo) 1203 def test_one(self, mock_foo): argument 1204 self._test(mock_foo)
|
D | testhelpers.py | 438 mock_foo = p.start() 441 mock_foo.assert_called_with(1)
|
/third_party/googletest/docs/ |
D | gmock_cook_book.md | 406 MockFoo mock_foo; 407 EXPECT_CALL(mock_foo, DoThis()); 408 ... code that uses mock_foo ... 412 If a method of `mock_foo` other than `DoThis()` is called, you will get a 420 NiceMock<MockFoo> mock_foo; 421 EXPECT_CALL(mock_foo, DoThis()); 422 ... code that uses mock_foo ... 436 NiceMock<MockFoo> mock_foo(5, "hi"); // Calls MockFoo(5, "hi"). 437 EXPECT_CALL(mock_foo, DoThis()); 438 ... code that uses mock_foo ... [all …]
|