Skip to content

Commit

Permalink
added _java suffix to file names
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSaydakov committed Aug 17, 2023
1 parent ae29b44 commit 52dfc8c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cpc/test/cpc_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("cpc sketch", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "cpc_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "cpc_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = cpc_sketch::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
REQUIRE(sketch.get_estimate() == Approx(n).margin(n * 0.02));
Expand Down
8 changes: 4 additions & 4 deletions fi/test/frequent_items_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("frequent longs", "[serde_compat]") {
for (const unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "frequent_long_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "frequent_long_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = frequent_items_sketch<int64_t>::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
if (n > 10) {
Expand All @@ -49,7 +49,7 @@ TEST_CASE("frequent strings", "[serde_compat]") {
for (const unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "frequent_string_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "frequent_string_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = frequent_items_sketch<std::string>::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
if (n > 10) {
Expand All @@ -64,7 +64,7 @@ TEST_CASE("frequent strings", "[serde_compat]") {
TEST_CASE("frequent strings ascii", "[serde_compat]") {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "frequent_string_ascii.sk", std::ios::binary);
is.open(testBinaryInputPath + "frequent_string_ascii_java.sk", std::ios::binary);
auto sketch = frequent_items_sketch<std::string>::deserialize(is);
REQUIRE_FALSE(sketch.is_empty());
REQUIRE(sketch.get_maximum_error() == 0);
Expand All @@ -78,7 +78,7 @@ TEST_CASE("frequent strings ascii", "[serde_compat]") {
TEST_CASE("frequent strings utf8", "[serde_compat]") {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "frequent_string_utf8.sk", std::ios::binary);
is.open(testBinaryInputPath + "frequent_string_utf8_java.sk", std::ios::binary);
auto sketch = frequent_items_sketch<std::string>::deserialize(is);
REQUIRE_FALSE(sketch.is_empty());
REQUIRE(sketch.get_maximum_error() == 0);
Expand Down
6 changes: 3 additions & 3 deletions hll/test/hll_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("hll4 sketch", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "hll4_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "hll4_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = hll_sketch::deserialize(is);
REQUIRE(sketch.get_lg_config_k() == 12);
REQUIRE(sketch.is_empty() == (n == 0));
Expand All @@ -45,7 +45,7 @@ TEST_CASE("hll6 sketch", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "hll6_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "hll6_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = hll_sketch::deserialize(is);
REQUIRE(sketch.get_lg_config_k() == 12);
REQUIRE(sketch.is_empty() == (n == 0));
Expand All @@ -58,7 +58,7 @@ TEST_CASE("hll8 sketch", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "hll8_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "hll8_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = hll_sketch::deserialize(is);
REQUIRE(sketch.get_lg_config_k() == 12);
REQUIRE(sketch.is_empty() == (n == 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("quantiles double", "[serde_compat]") {
for (const unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "quantiles_double_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "quantiles_double_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = quantiles_sketch<double>::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
REQUIRE(sketch.is_estimation_mode() == (n > quantiles_constants::DEFAULT_K));
Expand Down Expand Up @@ -62,7 +62,7 @@ TEST_CASE("quantiles string", "[serde_compat]") {
for (const unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "quantiles_string_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "quantiles_string_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = quantiles_sketch<std::string, string_as_number_less>::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
REQUIRE(sketch.is_estimation_mode() == (n > quantiles_constants::DEFAULT_K));
Expand Down
2 changes: 1 addition & 1 deletion req/test/req_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("req float", "[serde_compat]") {
for (const unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "req_float_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "req_float_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = req_sketch<float>::deserialize(is);
REQUIRE(sketch.is_HRA());
REQUIRE(sketch.is_empty() == (n == 0));
Expand Down
4 changes: 2 additions & 2 deletions theta/test/theta_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("theta sketch", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "theta_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "theta_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = compact_theta_sketch::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
REQUIRE(sketch.is_estimation_mode() == (n > 1000));
Expand All @@ -48,7 +48,7 @@ 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);
is.open(testBinaryInputPath + "theta_non_empty_no_entries_java.sk", std::ios::binary);
auto sketch = compact_theta_sketch::deserialize(is);
REQUIRE_FALSE(sketch.is_empty());
REQUIRE(sketch.get_num_retained() == 0);
Expand Down
6 changes: 3 additions & 3 deletions tuple/test/aod_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST_CASE("aod sketch one value", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "aod_1_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "aod_1_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = compact_array_of_doubles_sketch::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
REQUIRE(sketch.is_estimation_mode() == (n > 1000));
Expand All @@ -49,7 +49,7 @@ TEST_CASE("aod sketch three values", "[serde_compat]") {
for (unsigned n: n_arr) {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "aod_3_n" + std::to_string(n) + ".sk", std::ios::binary);
is.open(testBinaryInputPath + "aod_3_n" + std::to_string(n) + "_java.sk", std::ios::binary);
auto sketch = compact_array_of_doubles_sketch::deserialize(is);
REQUIRE(sketch.is_empty() == (n == 0));
REQUIRE(sketch.is_estimation_mode() == (n > 1000));
Expand All @@ -66,7 +66,7 @@ TEST_CASE("aod sketch three values", "[serde_compat]") {
TEST_CASE("aod sketch non-empty no entries", "[serde_compat]") {
std::ifstream is;
is.exceptions(std::ios::failbit | std::ios::badbit);
is.open(testBinaryInputPath + "aod_1_non_empty_no_entries.sk", std::ios::binary);
is.open(testBinaryInputPath + "aod_1_non_empty_no_entries_java.sk", std::ios::binary);
auto sketch = compact_array_of_doubles_sketch::deserialize(is);
REQUIRE_FALSE(sketch.is_empty());
REQUIRE(sketch.get_num_retained() == 0);
Expand Down

0 comments on commit 52dfc8c

Please sign in to comment.