Skip to content

Commit

Permalink
added a few assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSaydakov committed Aug 23, 2023
1 parent 4091e95 commit 4f57d2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fi/test/frequent_items_sketch_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ TEST_CASE("frequent items: several items, no resize, no purge", "[frequent_items
REQUIRE(sketch.get_estimate("b") == 3);
REQUIRE(sketch.get_estimate("c") == 2);
REQUIRE(sketch.get_estimate("d") == 1);
REQUIRE(sketch.get_maximum_error() == 0);
}

TEST_CASE("frequent items: several items, with resize, no purge", "[frequent_items_sketch]") {
Expand All @@ -96,6 +97,7 @@ TEST_CASE("frequent items: several items, with resize, no purge", "[frequent_ite
REQUIRE(sketch.get_estimate("b") == 3);
REQUIRE(sketch.get_estimate("c") == 2);
REQUIRE(sketch.get_estimate("d") == 1);
REQUIRE(sketch.get_maximum_error() == 0);
}

TEST_CASE("frequent items: estimation mode", "[frequent_items_sketch]") {
Expand Down Expand Up @@ -149,6 +151,7 @@ TEST_CASE("frequent items: merge exact mode", "[frequent_items_sketch]") {
REQUIRE(sketch1.get_estimate(2) == 3);
REQUIRE(sketch1.get_estimate(3) == 2);
REQUIRE(sketch1.get_estimate(4) == 1);
REQUIRE(sketch1.get_maximum_error() == 0);
}

TEST_CASE("frequent items: merge estimation mode", "[frequent_items_sketch]") {
Expand Down

0 comments on commit 4f57d2e

Please sign in to comment.