Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSaydakov committed Aug 1, 2023
1 parent ab602e9 commit 9df75a6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions theta/test/theta_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,13 @@ TEST_CASE("theta sketch", "[serde_compat]") {
}
}

TEST_CASE("theta sketch non-empty no entries", "[serde_compat]") {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "theta_non_empty_no_entries.sk", std::ios::binary);
auto sketch = compact_theta_sketch::deserialize(is);
REQUIRE_FALSE(sketch.is_empty());
REQUIRE(sketch.get_num_retained() == 0);
}

} /* namespace datasketches */

0 comments on commit 9df75a6

Please sign in to comment.