Home
last modified time | relevance | path

Searched refs:WillOnce (Results 1 – 25 of 56) sorted by relevance

123

/freebsd/contrib/googletest/googlemock/test/
H A Dgmock-function-mocker_test.cc304 .WillOnce(DoDefault()) in TYPED_TEST()
305 .WillOnce(Return(1)); in TYPED_TEST()
313 EXPECT_CALL(this->mock_foo_, Unary(Eq(2))).Times(2).WillOnce(Return(true)); in TYPED_TEST()
321 EXPECT_CALL(this->mock_foo_, Binary(2, _)).WillOnce(Return(3)); in TYPED_TEST()
330 .WillOnce(Return(5)); in TYPED_TEST()
339 .WillOnce(Return(true)); in TYPED_TEST()
348 .WillOnce(Return("Hello")); in TYPED_TEST()
355 EXPECT_CALL(this->mock_foo_, TakesConst(Lt(10))).WillOnce(DoDefault()); in TYPED_TEST()
363 .WillOnce(Return(1)); in TYPED_TEST()
365 .WillOnce(Return(2)); in TYPED_TEST()
[all …]
H A Dgmock_link_test.h251 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); in TEST()
260 EXPECT_CALL(mock, StringFromString(_)).WillOnce(Return(&ch)); in TEST()
268 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); in TEST()
277 EXPECT_CALL(mock, IntRefFromString(_)).WillOnce(ReturnRef(n)); in TEST()
286 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Assign(&ch, 'y')); in TEST()
295 EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArgPointee<0>('y')); in TEST()
306 .WillOnce(SetArrayArgument<0>(&ch2, &ch2 + 1)); in TEST()
317 EXPECT_CALL(mock, IntFromString(_)).WillOnce(SetErrnoAndReturn(1, -1)); in TEST()
330 .WillOnce(Invoke(&InvokeHelper::StaticVoidFromString)) in TEST()
331 .WillOnce(Invoke(&test_invoke_helper, &InvokeHelper::VoidFromString)); in TEST()
[all …]
H A Dgmock-spec-builders_test.cc185 EXPECT_CALL(cc, Method()).WillOnce(Return(42)); in TEST()
306 EXPECT_CALL(a, DoA(2)).WillOnce(Return()).With(_); in TEST()
316 EXPECT_CALL(a, DoA(1)).WillOnce(Return()); in TEST()
318 EXPECT_CALL(a, DoA(2)).WillOnce(Return()).WillRepeatedly(Return()); in TEST()
391 EXPECT_CALL(a, DoA(1)).WillOnce(Return()).InSequence(s); in TEST()
403 { EXPECT_CALL(a, DoA(2)).WillOnce(Return()).After(e); }, in TEST()
414 EXPECT_CALL(a, DoA(2)).WillOnce(Return()); in TEST()
425 .WillOnce(Return()) in TEST()
426 .WillOnce(Return()) in TEST()
427 .WillOnce(Return()); in TEST()
[all …]
H A Dgmock-actions_test.cc701 .WillOnce(Return(std::vector<int>{17, 19, 23})) in TEST()
738 EXPECT_CALL(mock, Call).WillOnce(Return(In())); in TEST()
754 EXPECT_CALL(mock, Call).WillOnce(Return(17)).WillRepeatedly(Return(19)); in TEST()
799 .WillOnce(Return(std::unique_ptr<int>(new int(17)))); in TEST()
1010 EXPECT_CALL(mock, IntFunc(_)).WillOnce(DoDefault()); in TEST()
1048 EXPECT_CALL(mock, IntFunc(_)).WillOnce(DoDefault()); in TEST()
1057 EXPECT_CALL(mock, IntFunc(_)).WillOnce(DoDefault()); in TEST()
1337 EXPECT_CALL(mock, Call).WillOnce(DoAll(InitialAction{}, FinalAction{})); in TEST()
1360 .WillOnce(DoAll(InitialAction{}, InitialAction{}, [](Obj&&) {})) in TEST()
1379 .WillOnce(DoAll(InitialAction{}, InitialAction{}, [](const Obj&) {})) in TEST()
[all …]
/freebsd/tests/sys/fs/fusefs/
H A Dlookup.cc75 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
162 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
183 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
209 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
217 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
244 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
252 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
264 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
290 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
307 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
[all …]
H A Drename.cc66 EXPECT_LOOKUP(src_ino, RELDST).WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
81 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
108 .WillOnce(ReturnNegativeCache(&entry_valid)); in TEST_F()
121 ).WillOnce(Invoke(ReturnErrno(0))); in TEST_F()
142 .WillOnce(ReturnNegativeCache(&entry_valid)) in TEST_F()
156 ).WillOnce(Invoke(ReturnErrno(0))); in TEST_F()
196 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
209 ).WillOnce(Invoke(ReturnErrno(0))); in TEST_F()
231 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
242 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
[all …]
H A Dinterrupt.cc106 ).WillOnce(Invoke([=](auto in, auto &out __unused) { in expect_mkdir()
124 ).WillOnce(Invoke([=](auto in, auto &out __unused) { in expect_read()
142 ).WillOnce(Invoke([=](auto in, auto &out __unused) { in expect_write()
236 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
244 ).WillOnce(Invoke([&](auto in, auto &out) { in TEST_F()
262 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
297 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
299 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
308 .WillOnce(Invoke([&](auto in, auto &out) { in TEST_F()
330 .WillOnce(Invoke([&](auto in, auto &out) { in TEST_F()
[all …]
H A Dmkdir.cc60 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
71 ).WillOnce(Invoke(ReturnErrno(EMLINK))); in TEST_F()
95 .WillOnce(ReturnNegativeCache(&entry_valid)); in TEST_F()
106 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
131 .WillOnce(Invoke(ReturnNegativeCache(&entry_valid))) in TEST_F()
144 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
171 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
183 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
213 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
225 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
[all …]
H A Dlink.cc53 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_link()
87 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_link()
118 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
135 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
159 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
171 ).WillOnce(Invoke(ReturnErrno(EMLINK))); in TEST_F()
192 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
194 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
211 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
235 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
[all …]
H A Dcreate.cc58 ).WillOnce(Invoke(r)); in expect_create()
82 ).WillOnce(Invoke(r)); in expect_create()
106 ).WillOnce(Invoke(r)); in expect_create()
125 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
159 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
203 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
222 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
235 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
249 ).WillOnce(Invoke(ReturnImmediate([](auto in __unused, auto& out) { in TEST_F()
278 .WillOnce(ReturnNegativeCache(&entry_valid)); in TEST_F()
[all …]
H A Dmknod.cc86 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_mknod()
128 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_mknod()
154 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
169 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
186 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
197 ).WillOnce(Invoke(ReturnErrno(EPERM))); in TEST_F()
211 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
233 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
268 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
298 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
[all …]
H A Dsymlink.cc55 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_symlink()
84 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_symlink()
108 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
136 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
147 ).WillOnce(Invoke(ReturnErrno(ENOSPC))); in TEST_F()
161 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
185 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
204 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
H A Dnfs.cc83 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
94 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
120 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
131 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
158 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
184 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
195 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
229 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
251 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
273 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
[all …]
H A Dsetattr.cc102 ).WillOnce(Invoke(ReturnImmediate([](auto in __unused, auto& out) { in TEST_F()
133 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
148 ).WillOnce(Invoke(ReturnImmediate([](auto in __unused, auto& out) { in TEST_F()
172 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
182 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
200 ).WillOnce(Invoke(ReturnImmediate([](auto in __unused, auto& out) { in TEST_F()
232 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
250 ).WillOnce(Invoke(ReturnImmediate([](auto in __unused, auto& out) { in TEST_F()
274 .WillOnce(Invoke(ReturnImmediate([=](auto in, auto& out) { in TEST_F()
288 ).WillOnce(Invoke(ReturnErrno(EPERM))); in TEST_F()
[all …]
H A Dlseek.cc71 ).WillOnce(Invoke(ReturnErrno(ENOSYS))); in TEST_F()
103 ).WillOnce(Invoke(ReturnImmediate([=](auto i, auto& out) { in TEST_F()
128 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
203 ).WillOnce(Invoke(ReturnErrno(ENOSYS))); in TEST_F()
232 ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { in TEST_F()
263 ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { in TEST_F()
299 ).WillOnce(Invoke(ReturnErrno(ENXIO))); in TEST_F()
357 ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { in TEST_F()
392 ).WillOnce(Invoke(ReturnErrno(ENOSYS))); in TEST_F()
429 ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { in TEST_F()
[all …]
H A Ddev_fuse_poll.cc129 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
136 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
143 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
157 .WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) { in TEST_F()
177 .WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) { in TEST_F()
191 .WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) { in TEST_F()
H A Dopen.cc62 ).WillOnce(Invoke(ReturnImmediate([](auto in __unused, auto& out) { in test_ok()
126 ).WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
155 ).WillOnce(Invoke(ReturnErrno(EPERM))); in TEST_F()
184 ).WillOnce(Invoke( in TEST_F()
198 ).WillOnce(Invoke( in TEST_F()
302 .WillOnce(Invoke(ReturnErrno(ENOSYS))); in TEST_F()
330 .WillOnce(Invoke(ReturnErrno(ENOSYS))); in TEST_F()
H A Dutils.cc206 ).WillOnce(Invoke(ReturnErrno(error))); in expect_access()
217 ).WillOnce(Invoke(ReturnImmediate([=](auto in, auto& out) { in expect_destroy()
265 ).WillOnce(Invoke([=](auto in __unused, auto &out __unused) { in expect_forget()
280 ).WillOnce(Invoke(ReturnImmediate([=](auto i __unused, auto& out) { in expect_getattr()
300 ).WillOnce(Invoke(r)); in expect_getxattr()
376 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_opendir()
399 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_read()
465 ).WillOnce(Invoke(ReturnErrno(0))); in expect_release()
477 ).WillOnce(Invoke(r)); in expect_releasedir()
489 ).WillOnce(Invok in expect_unlink()
[all...]
H A Dgetattr.cc94 ).WillOnce(Invoke(ReturnImmediate([](auto i __unused, auto& out) { in TEST_F()
157 ).WillOnce(Invoke(ReturnImmediate([](auto i __unused, auto& out) { in TEST_F()
186 ).WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
213 ).WillOnce(Invoke(ReturnImmediate([](auto i __unused, auto& out) { in TEST_F()
278 .WillOnce(Invoke( in TEST_F()
294 ).WillOnce(Invoke(ReturnImmediate([](auto i __unused, auto& out) { in TEST_F()
318 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
331 ).WillOnce(Invoke(ReturnImmediate([](auto i __unused, auto& out) { in TEST_F()
H A Ddefault_permissions.cc82 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_chmod()
101 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_create()
123 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_copy_file_range()
188 ).WillOnce(Invoke(ReturnErrno(0))); in expect_removexattr()
201 ).WillOnce(Invoke(r)); in expect_getxattr()
214 ).WillOnce(Invoke(ReturnImmediate([](auto i __unused, auto& out) { in expect_listxattr()
234 ).WillOnce(Invoke(ReturnErrno(error))); in expect_rename()
247 ).WillOnce(Invoke(ReturnErrno(error))); in expect_setxattr()
375 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
432 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
[all …]
H A Dlast_local_modify.cc231 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_P()
249 .WillOnce(Invoke([&](auto in, auto &out __unused) { in TEST_P()
271 .WillOnce(Invoke([&](auto in __unused, auto& out) { in TEST_P()
389 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) in TEST_P()
402 .WillOnce(Invoke([&](auto in, auto &out __unused) { in TEST_P()
433 .WillOnce(Invoke([&](auto in __unused, auto& out) { in TEST_P()
H A Dstatfs.cc53 ).WillOnce(Invoke(ReturnErrno(EIO))); in TEST_F()
110 ).WillOnce(Invoke([&](auto in __unused, auto &out __unused) { in TEST_F()
142 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
H A Dcopy_file_range.cc92 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in expect_write()
182 ).WillOnce(Invoke(ReturnErrno(EIO))); in TEST_F()
234 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
312 ).WillOnce(Invoke(ReturnErrno(ENOSYS))); in TEST_F()
366 ).WillOnce(Invoke(ReturnImmediate([&](auto in __unused, auto& out) { in TEST_F()
472 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
521 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
562 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
612 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
672 ).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
[all …]
H A Dfifo.cc163 .WillOnce(Invoke(ReturnErrno(ENOENT))); in TEST_F()
170 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
180 .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { in TEST_F()
/freebsd/contrib/googletest/docs/reference/
H A Dmocking.md84 .WillOnce(action) // Can be used any number of times
140 * If neither [`WillOnce`](#EXPECT_CALL.WillOnce) nor
143 * If there are *n* `WillOnce` clauses and no `WillRepeatedly` clause, where
145 * If there are *n* `WillOnce` clauses and one `WillRepeatedly` clause, where
221 #### WillOnce {#EXPECT_CALL.WillOnce}
223 `.WillOnce(`*`action`*`)`
233 The use of `WillOnce` implicitly sets a cardinality on the expectation when
245 .WillOnce(Return(1))
246 .WillOnce(Return(2))
247 .WillOnce(Return(3));
[all …]

123