Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ple13 committed Jan 5, 2024
1 parent 36f39ac commit 080dfec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/cc/any_sketch/crypto/secret_share_generator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ TEST(AdditiveSecretSharing, SecretShareOverRingZ2kElementsSucceeds) {
std::vector<uint32_t> share_vector_from_seed,
prng->GenerateUniformRandomRange(input.size(), param.modulus()));

ASSERT_EQ(secret_share.share_vector().size(), input.size());
ASSERT_EQ(share_vector_from_seed.size(), input.size());

for (int i = 0; i < input.size(); i++) {
ASSERT_EQ(input[i],
(share_vector_from_seed[i] + secret_share.share_vector(i)) %
Expand Down Expand Up @@ -96,6 +99,9 @@ TEST(AdditiveSecretSharing, SecretShareOverPrimeFieldElementsSucceeds) {
std::vector<uint32_t> share_vector_from_seed,
prng->GenerateUniformRandomRange(input.size(), param.modulus()));

ASSERT_EQ(secret_share.share_vector().size(), input.size());
ASSERT_EQ(share_vector_from_seed.size(), input.size());

for (int i = 0; i < input.size(); i++) {
ASSERT_EQ(input[i],
(share_vector_from_seed[i] + secret_share.share_vector(i)) %
Expand Down

0 comments on commit 080dfec

Please sign in to comment.