Lines Matching refs:responses
94 void verifyResponses(const vector<uint8_t>& expected, const vector<ComputeResult>& responses) { in verifyResponses() argument
95 for (auto& response : responses) { in verifyResponses()
170 auto responses = computeAllSharedSecrets(params); in TEST_F() local
171 ASSERT_GT(responses.size(), 0U); in TEST_F()
172 verifyResponses(responses[0].sharing_check, responses); in TEST_F()
179 responses = computeAllSharedSecrets(params); in TEST_F()
180 ASSERT_GT(responses.size(), 0U); in TEST_F()
181 ASSERT_EQ(32U, responses[0].sharing_check.size()); in TEST_F()
182 verifyResponses(responses[0].sharing_check, responses); in TEST_F()
212 auto responses = computeAllSharedSecrets(params); in TEST_F() local
214 ASSERT_GT(responses.size(), 0U); in TEST_F()
215 vector<uint8_t> correct_response = responses[0].sharing_check; in TEST_F()
216 verifyResponses(correct_response, responses); in TEST_F()
225 responses = computeAllSharedSecrets(params); in TEST_F()
226 for (size_t i = 0; i < responses.size(); ++i) { in TEST_F()
228 EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, responses[i].error) in TEST_F()
232 EXPECT_EQ(ErrorCode::OK, responses[i].error) << "Others should succeed"; in TEST_F()
233 EXPECT_NE(correct_response, responses[i].sharing_check) in TEST_F()
252 auto responses = computeAllSharedSecrets(params); in TEST_F() local
254 ASSERT_GT(responses.size(), 0U); in TEST_F()
255 vector<uint8_t> correct_response = responses[0].sharing_check; in TEST_F()
256 verifyResponses(correct_response, responses); in TEST_F()
264 responses = computeAllSharedSecrets(params); in TEST_F()
265 for (size_t i = 0; i < responses.size(); ++i) { in TEST_F()
267 EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, responses[i].error) in TEST_F()
274 if (responses[i].error == ErrorCode::OK) { in TEST_F()
275 EXPECT_NE(correct_response, responses[i].sharing_check) in TEST_F()
279 EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, responses[i].error); in TEST_F()
296 auto responses = computeAllSharedSecrets(params); in TEST_F() local
298 ASSERT_GT(responses.size(), 0U); in TEST_F()
299 vector<uint8_t> correct_response = responses[0].sharing_check; in TEST_F()
300 verifyResponses(correct_response, responses); in TEST_F()
312 responses = computeAllSharedSecrets(params); in TEST_F()
313 for (size_t i = 0; i < responses.size(); ++i) { in TEST_F()
315 EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, responses[i].error) in TEST_F()
319 EXPECT_EQ(ErrorCode::OK, responses[i].error) << "Others should succeed"; in TEST_F()
320 EXPECT_NE(correct_response, responses[i].sharing_check) in TEST_F()
338 auto responses = computeAllSharedSecrets(params); in TEST_F() local
340 ASSERT_GT(responses.size(), 0U); in TEST_F()
341 vector<uint8_t> correct_response = responses[0].sharing_check; in TEST_F()
342 verifyResponses(correct_response, responses); in TEST_F()
350 responses = computeAllSharedSecrets(params); in TEST_F()
351 for (size_t i = 0; i < responses.size(); ++i) { in TEST_F()
353 EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, responses[i].error) in TEST_F()
360 if (responses[i].error == ErrorCode::OK) { in TEST_F()
361 EXPECT_NE(correct_response, responses[i].sharing_check) in TEST_F()
365 EXPECT_EQ(ErrorCode::INVALID_ARGUMENT, responses[i].error); in TEST_F()