Skip to content

Commit

Permalink
Add test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
ple13 committed Feb 23, 2024
1 parent bf02fe0 commit bb4306c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@ TEST(EstimateReach, VidSamplingIntervalWidthGreaterThanOneFails) {
StatusIs(absl::StatusCode::kInvalidArgument, "interval width"));
}

TEST(EstimateReach, ValidInputSucceeds) {
ASSERT_OK_AND_ASSIGN(int64_t reach_1, EstimateReach(10, 0.5));
EXPECT_EQ(reach_1, 20);
ASSERT_OK_AND_ASSIGN(int64_t reach_2, EstimateReach(10, 1.0));
EXPECT_EQ(reach_2, 10);
}

TEST(CombineSketchShares, EmptySketchSharesFails) {
ShareShuffleSketchParams sketch_params;
sketch_params.set_ring_modulus(kRingModulus);
Expand Down

0 comments on commit bb4306c

Please sign in to comment.