Merge "Fix nonce uniqueness tests" into main

This commit is contained in:
Ryan Prichard 2023-09-22 19:43:55 +00:00 committed by Gerrit Code Review
commit 8d333ff410
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ TEST_P(HmacKeySharingTest, ComputeSharedHmac) {
auto nonces = copyNonces(params);
EXPECT_EQ(allKeymasters().size(), nonces.size());
std::sort(nonces.begin(), nonces.end());
std::unique(nonces.begin(), nonces.end());
nonces.erase(std::unique(nonces.begin(), nonces.end()), nonces.end());
EXPECT_EQ(allKeymasters().size(), nonces.size());
auto responses = computeSharedHmac(allKeymasters(), params);

View file

@ -164,7 +164,7 @@ TEST_F(SharedSecretAidlTest, ComputeSharedSecret) {
auto nonces = copyNonces(params);
EXPECT_EQ(sharedSecrets.size(), nonces.size());
std::sort(nonces.begin(), nonces.end());
std::unique(nonces.begin(), nonces.end());
nonces.erase(std::unique(nonces.begin(), nonces.end()), nonces.end());
EXPECT_EQ(sharedSecrets.size(), nonces.size());
auto responses = computeAllSharedSecrets(params);