• Home
  • Raw
  • Download

Lines Matching refs:num_callbacks

36   std::shared_ptr<int> num_callbacks(new int{0});  in TEST()  local
37 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
43 (*num_callbacks)++; in TEST()
57 ASSERT_EQ(1, *num_callbacks); in TEST()
63 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
64 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
69 (*num_callbacks)++; in TEST()
77 ASSERT_EQ(1, *num_callbacks); in TEST()
82 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
85 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
87 (*num_callbacks)++; in TEST()
90 ASSERT_EQ(1, *num_callbacks); in TEST()
97 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
100 [num_callbacks](AsyncResult<TestMessage>) { (*num_callbacks)++; }); in TEST()
104 ASSERT_GE(num_callbacks.use_count(), 2); in TEST()
109 ASSERT_EQ(1, num_callbacks.use_count()); in TEST()
110 ASSERT_EQ(0, *num_callbacks); in TEST()
113 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
116 (*num_callbacks)++; in TEST()
121 ASSERT_EQ(1, *num_callbacks); in TEST()
122 ASSERT_EQ(1, num_callbacks.use_count()); in TEST()
127 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
129 [num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
135 (*num_callbacks)++; in TEST()
153 ASSERT_EQ(0, *num_callbacks); in TEST()
156 ASSERT_EQ(1, *num_callbacks); in TEST()
165 ASSERT_EQ(2, *num_callbacks); in TEST()
169 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
171 (*num_callbacks)++; in TEST()
174 ASSERT_EQ(3, *num_callbacks); in TEST()
176 ASSERT_EQ(1, num_callbacks.use_count()); in TEST()
183 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
185 [num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
187 ASSERT_EQ(*num_callbacks == 0 ? 13 : -1, msg.fd()); in TEST()
188 ASSERT_EQ(*num_callbacks, msg->num()); in TEST()
189 ASSERT_EQ(std::to_string(*num_callbacks), msg->str()); in TEST()
191 (*num_callbacks)++; in TEST()
211 ASSERT_EQ(4, *num_callbacks); in TEST()
214 ASSERT_EQ(4, *num_callbacks); in TEST()
216 ASSERT_EQ(1, num_callbacks.use_count()); in TEST()
222 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
226 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
227 ASSERT_EQ((*num_callbacks) < 3, msg.success()); in TEST()
229 (*num_callbacks)++; in TEST()
240 ASSERT_EQ(4, *num_callbacks); in TEST()
244 ASSERT_EQ(4, *num_callbacks); in TEST()
245 ASSERT_EQ(1, num_callbacks.use_count()); in TEST()
252 std::shared_ptr<int> num_callbacks(new int{0}); in TEST() local
253 deferred.Bind([num_callbacks](AsyncResult<TestMessage> msg) { in TEST()
258 (*num_callbacks)++; in TEST()
276 ASSERT_EQ(1, *num_callbacks); in TEST()