Home
last modified time | relevance | path

Searched refs:Mock (Results 1 – 25 of 278) sorted by relevance

12345678910>>...12

/third_party/skia/tests/
DTDPQueueTest.cpp67 struct Mock { struct
72 static bool LessP(Mock* const& a, Mock* const& b) { return a->fPriority < b->fPriority; } in LessP() argument
73 static int* PQIndex(Mock* const& mock) { return &mock->fIndex; } in PQIndex() argument
75 bool operator== (const Mock& that) const { in operator ==() argument
78 bool operator!= (const Mock& that) const { return !(*this == that); } in operator !=() argument
83 static const Mock kSentinel = {-1, -1, -1}; in random_test()
88 SkTDArray<Mock> array; in random_test()
91 Mock* mock = array.append(); in random_test()
102 SkTDPQueue<Mock*, Mock::LessP, Mock::PQIndex> pq; in random_test()
115 Mock* top = pq.peek(); in random_test()
[all …]
/third_party/python/Lib/unittest/test/testmock/
Dtestmock.py12 MagicMock, Mock, NonCallableMock,
60 mock = Mock()
65 self.assertTrue(is_instance(mock.return_value, Mock),
88 mock = Mock(return_value=None)
109 mock = Mock(name='foo')
113 mocks = [(Mock(), 'mock'), (Mock(name='bar'), 'bar')]
128 mock = Mock(spec=X)
131 mock = Mock(spec=X())
134 mock = Mock(spec_set=X)
137 mock = Mock(spec_set=X())
[all …]
Dtestsealable.py15 m = mock.Mock()
17 self.assertIsInstance(m.test, mock.Mock)
18 self.assertIsInstance(m.test(), mock.Mock)
19 self.assertIsInstance(m.test().test2(), mock.Mock)
22 m = mock.Mock()
31 m = mock.Mock()
38 m = mock.Mock()
46 m = mock.Mock()
54 m = mock.Mock()
62 m = mock.Mock(test_value=1)
[all …]
Dtestmagicmethods.py5 from unittest.mock import AsyncMock, Mock, MagicMock, _magics
12 mock = Mock()
15 mock.__getitem__ = Mock()
36 mock = Mock()
50 mock1 = Mock()
51 mock2 = Mock()
53 mock1.__iter__ = Mock(return_value=iter([]))
59 mock = Mock()
66 mock = Mock()
73 mock = Mock()
[all …]
/third_party/googletest/googlemock/test/
Dgmock_link_test.h210 class Mock: public Interface {
212 Mock() {} in Mock() function
225 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
248 Mock mock; in TEST()
256 Mock mock; in TEST()
265 Mock mock; in TEST()
273 Mock mock; in TEST()
282 Mock mock; in TEST()
291 Mock mock; in TEST()
300 Mock mock; in TEST()
[all …]
Dgmock-nice-strict_test.cc40 class Mock { class
42 Mock() {} in Mock() function in Mock
47 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
193 EXPECT_TRUE(Mock::IsNaggy(&raw_foo)); in TEST()
194 EXPECT_FALSE(Mock::IsNice(&raw_foo)); in TEST()
195 EXPECT_FALSE(Mock::IsStrict(&raw_foo)); in TEST()
294 Mock::AllowLeak(leaked); in TEST()
306 NiceMock< ::Mock> nice; in TEST()
320 EXPECT_FALSE(Mock::IsNaggy(&nice_foo)); in TEST()
321 EXPECT_TRUE(Mock::IsNice(&nice_foo)); in TEST()
[all …]
/third_party/mesa3d/bin/
Dpost_version_test.py28 @mock.patch('bin.post_version.subprocess.run', mock.Mock())
34 with mock.patch('bin.post_version.subprocess.run', mock.Mock()), \
44 m = mock.Mock()
45 with mock.patch('bin.post_version.csv.reader', mock.Mock(return_value=data.copy())), \
46 mock.patch('bin.post_version.csv.writer', mock.Mock(return_value=m)):
59 m = mock.Mock()
60 with mock.patch('bin.post_version.csv.reader', mock.Mock(return_value=data.copy())), \
61 mock.patch('bin.post_version.csv.writer', mock.Mock(return_value=m)):
/third_party/python/Lib/test/test_asyncio/
Dtest_selector_events.py30 self._ssock = mock.Mock()
31 self._csock = mock.Mock()
55 self.selector = mock.Mock()
61 m = mock.Mock()
62 self.loop.add_reader = mock.Mock()
75 m = mock.Mock()
76 self.loop._add_reader = mock.Mock()
78 self.loop._add_writer = mock.Mock()
79 self.loop._remove_reader = mock.Mock()
80 self.loop._remove_writer = mock.Mock()
[all …]
Dtest_proactor_events.py39 self.proactor = mock.Mock()
42 self.sock = mock.Mock(socket.socket)
87 tr.close = mock.Mock()
98 tr._fatal_error = mock.Mock()
109 tr._fatal_error = mock.Mock()
117 tr._fatal_error = mock.Mock()
126 tr._fatal_error = mock.Mock()
127 tr._force_close = mock.Mock()
136 tr._fatal_error = mock.Mock()
144 tr._loop_writing = mock.Mock()
[all …]
Dtest_protocols.py10 f = mock.Mock()
19 f = mock.Mock()
30 f = mock.Mock()
41 f = mock.Mock()
50 f = mock.Mock()
Dtest_base_events.py156 self.loop._selector = mock.Mock()
161 m = mock.Mock()
220 self.loop._process_events = mock.Mock()
221 self.loop._write_to_self = mock.Mock()
228 executor = mock.Mock()
265 self.loop._process_events = mock.Mock()
275 self.loop._process_events = mock.Mock()
340 self.loop._process_events = mock.Mock()
341 self.loop._write_to_self = mock.Mock()
364 self.loop._process_events = mock.Mock()
[all …]
/third_party/skia/third_party/externals/angle2/src/libANGLE/
DOverlay.h121 const overlay::Mock *getTextWidget(WidgetId id) const { return &mMock; } in getTextWidget()
122 const overlay::Mock *getCountWidget(WidgetId id) const { return &mMock; } in getCountWidget()
123 const overlay::Mock *getPerSecondWidget(WidgetId id) const { return &mMock; } in getPerSecondWidget()
124 const overlay::Mock *getRunningGraphWidget(WidgetId id) const { return &mMock; } in getRunningGraphWidget()
125 const overlay::Mock *getRunningHistogramWidget(WidgetId id) const { return &mMock; } in getRunningHistogramWidget()
130 overlay::Mock mMock;
142 using CountWidget = const overlay::Mock;
143 using PerSecondWidget = const overlay::Mock;
144 using RunningGraphWidget = const overlay::Mock;
145 using RunningHistogramWidget = const overlay::Mock;
[all …]
/third_party/grpc/src/csharp/Grpc.Examples.Tests/
DMathClientMockableTest.cs36 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseBlockingUnaryCallCanBeMocked()
46 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseBlockingUnaryCallWithCallOptionsCallCanBeMocked()
56 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseAsyncUnaryCallCanBeMocked()
67 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseClientStreamingCallCanBeMocked()
68 var mockRequestStream = new Moq.Mock<IClientStreamWriter<Num>>(); in ClientBaseClientStreamingCallCanBeMocked()
79 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseServerStreamingCallCanBeMocked()
80 var mockResponseStream = new Moq.Mock<IAsyncStreamReader<Num>>(); in ClientBaseServerStreamingCallCanBeMocked()
91 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseDuplexStreamingCallCanBeMocked()
92 var mockRequestStream = new Moq.Mock<IClientStreamWriter<DivArgs>>(); in ClientBaseDuplexStreamingCallCanBeMocked()
93 var mockResponseStream = new Moq.Mock<IAsyncStreamReader<DivReply>>(); in ClientBaseDuplexStreamingCallCanBeMocked()
/third_party/python/Lib/idlelib/idle_test/
Dtest_squeezer.py6 from unittest.mock import Mock, NonCallableMagicMock, patch, sentinel, ANY
149 editwin.write = orig_write = Mock(return_value=SENTINEL_VALUE)
176 editwin.write = orig_write = Mock(return_value=SENTINEL_VALUE)
187 editwin.write = orig_write = Mock(return_value=SENTINEL_VALUE)
201 squeezer.count_lines = Mock(return_value=6)
214 squeezer.count_lines = Mock(return_value=6)
241 squeezer.count_lines = Mock(return_value=6)
261 squeezer.count_lines = Mock(return_value=6)
311 squeezer = Mock()
360 retval = expandingbutton.expand(event=Mock())
[all …]
/third_party/googletest/googlemock/src/
Dgmock-spec-builders.cc323 Mock::Register(mock_obj, this); in RegisterOwner()
389 Mock::GetReactionOnUninterestingCalls(MockObject()); in UntypedInvokeWith()
686 void Mock::AllowUninterestingCalls(const void* mock_obj) in AllowUninterestingCalls()
693 void Mock::WarnUninterestingCalls(const void* mock_obj) in WarnUninterestingCalls()
700 void Mock::FailUninterestingCalls(const void* mock_obj) in FailUninterestingCalls()
707 void Mock::UnregisterCallReaction(const void* mock_obj) in UnregisterCallReaction()
715 internal::CallReaction Mock::GetReactionOnUninterestingCalls( in GetReactionOnUninterestingCalls()
726 void Mock::AllowLeak(const void* mock_obj) in AllowLeak()
735 bool Mock::VerifyAndClearExpectations(void* mock_obj) in VerifyAndClearExpectations()
744 bool Mock::VerifyAndClear(void* mock_obj) in VerifyAndClear()
[all …]
/third_party/typescript/tests/baselines/reference/
DgetParameterNameAtPosition.types4 interface Mock<Y extends any[]> extends Function {
18 declare function fn<Y extends any[]>(implementation?: (...args: Y) => any): Mock<Y>;
19 >fn : <Y extends any[]>(implementation?: ((...args: Y) => any) | undefined) => Mock<Y>
26 >fn(opts => { }) : Mock<[opts: any]>
27 >fn : <Y extends any[]>(implementation?: ((...args: Y) => any) | undefined) => Mock<Y>
DgetParameterNameAtPosition.symbols4 interface Mock<Y extends any[]> extends Function {
5 >Mock : Symbol(Mock, Decl(getParameterNameAtPosition.ts, 0, 0))
24 declare function fn<Y extends any[]>(implementation?: (...args: Y) => any): Mock<Y>;
30 >Mock : Symbol(Mock, Decl(getParameterNameAtPosition.ts, 0, 0))
/third_party/python/Doc/library/
Dunittest.mock.rst6 :synopsis: Mock object library.
21 :mod:`unittest.mock` provides a core :class:`Mock` class removing the need to
30 some examples of how to use :class:`Mock`, :class:`MagicMock` and
33 Mock is designed for use with :mod:`unittest` and
60 :class:`Mock` and :class:`MagicMock` objects create all attributes and
75 >>> mock = Mock(side_effect=KeyError('foo'))
92 Mock has many other ways you can configure it and control its behaviour. For
146 Mock supports the mocking of Python :ref:`magic methods <magic-methods>`. The
156 Mock allows you to assign functions (or other Mock instances) to magic methods
157 and they will be called appropriately. The :class:`MagicMock` class is just a Mock
[all …]
Dunittest.mock-examples.rst17 from unittest.mock import Mock, MagicMock, AsyncMock, patch, call, sentinel
26 Using Mock
29 Mock Patching Methods
32 Common uses for :class:`Mock` objects include:
50 In most of these examples the :class:`Mock` and :class:`MagicMock` classes
54 Once the mock has been called its :attr:`~Mock.called` attribute is set to
55 ``True``. More importantly we can use the :meth:`~Mock.assert_called_with` or
56 :meth:`~Mock.assert_called_once_with` method to check that it was called with
75 Mock for Method Calls on an Object
95 >>> mock = Mock()
[all …]
/third_party/flutter/skia/third_party/externals/angle2/third_party/vulkan-tools/
DREADME.angle2 Short Name: Vulkan Mock ICD
13 The Khronos Vulkan Tools Components contain the Vulkan Mock Installable
15 primarily interested in the Mock ICD and uses it to run experiments
16 with the Mock ICD as a null driver.
/third_party/boost/tools/build/test/qt4/
Dmock.cpp12 Mock::Mock() in Mock() function in Mock
22 delete new Mock(); in BOOST_AUTO_TEST_CASE()
/third_party/boost/tools/build/test/qt5/
Dmock.cpp12 Mock::Mock() in Mock() function in Mock
22 delete new Mock(); in BOOST_AUTO_TEST_CASE()
/third_party/flutter/flutter/packages/flutter_tools/test/general.shard/web/
Dweb_fs_test.dart89 class MockBuildDaemonCreator extends Mock implements BuildDaemonCreator {}
90 class MockBuildDaemonClient extends Mock implements BuildDaemonClient {}
91 class MockDwds extends Mock implements Dwds {}
92 class MockHttpMultiServer extends Mock implements HttpMultiServer {}
93 class MockChromeLauncher extends Mock implements ChromeLauncher {}
94 class MockOperatingSystemUtils extends Mock implements OperatingSystemUtils {}
/third_party/googletest/googlemock/include/gmock/
Dgmock-nice-strict.h112 NiceMockImpl() { ::testing::Mock::AllowUninterestingCalls(this); } in NiceMockImpl()
114 ~NiceMockImpl() { ::testing::Mock::UnregisterCallReaction(this); } in ~NiceMockImpl()
120 NaggyMockImpl() { ::testing::Mock::WarnUninterestingCalls(this); } in NaggyMockImpl()
122 ~NaggyMockImpl() { ::testing::Mock::UnregisterCallReaction(this); } in ~NaggyMockImpl()
128 StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); } in StrictMockImpl()
130 ~StrictMockImpl() { ::testing::Mock::UnregisterCallReaction(this); } in ~StrictMockImpl()
/third_party/flutter/flutter/dev/manual_tests/test/
Dmock_image_http.dart29 class MockHttpClient extends Mock implements HttpClient {}
31 class MockHttpClientRequest extends Mock implements HttpClientRequest {}
33 class MockHttpClientResponse extends Mock implements HttpClientResponse {}
35 class MockHttpHeaders extends Mock implements HttpHeaders {}

12345678910>>...12