Lines Matching refs:expectation
253 static void check_data_cb(read_expects* expectation, ssize_t nread,
259 CHECK_GT(expectation->expected_len, 0);
260 for (i = 0; i < nread && expectation->pos <= expectation->expected_len; i++) {
261 c = expectation->expected[expectation->pos++];
265 expectation->pos - 1);
271 if (expectation->pos == expectation->expected_len) {
272 expectation->read_expected = true;
290 read_expects expectation;
291 expectation.expected = data;
292 expectation.expected_len = len;
293 expectation.pos = 0;
294 expectation.read_expected = false;
295 expectation.callback_called = false;
296 return expectation;
319 read_expects expectation = prepare_expects(data, len);
320 client_socket.data = ℰ
323 SPIN_WHILE(!expectation.read_expected);