Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/api/layout/execute_with_estimation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,16 +553,16 @@ TEST(execute_estimation_test, with_rearrangement)

#ifdef _LIBCPP_VERSION // seqan::hibf::sketch::toolbox::sort_by_cardinalities is not stable
result +=
R"expected_cout(64 1.00 2.26 1.00 2.26 110.5KiB
128 1.22 1.96 1.08 2.11 118.9KiB
256 1.33 1.66 1.18 1.97 130.9KiB
R"expected_cout(64 1.00 1.66 1.00 1.66 4.5MiB
128 1.22 1.78 1.15 2.05 5.2MiB
256 1.33 1.48 1.36 2.01 6.2MiB
# Best t_max (regarding expected query runtime): 256
)expected_cout";
#else
result +=
R"expected_cout(64 1.00 2.34 1.00 2.34 110.1KiB
128 1.22 2.01 1.08 2.17 118.9KiB
256 1.33 1.76 1.39 2.44 152.7KiB
R"expected_cout(64 1.00 1.65 1.00 1.65 4.5MiB
128 1.22 1.78 1.15 2.05 5.2MiB
256 1.33 1.48 1.36 2.01 6.2MiB
# Best t_max (regarding expected query runtime): 256
)expected_cout";
#endif
Expand Down
2 changes: 1 addition & 1 deletion test/api/sketch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ add_api_test (check_filenames_test.cpp)
target_use_datasources (check_filenames_test FILES seq1.fa)
target_use_datasources (check_filenames_test FILES seq2.fa)
target_use_datasources (check_filenames_test FILES seq3.fa)
target_use_datasources (check_filenames_test FILES small.minimiser)
target_use_datasources (check_filenames_test FILES dummy.minimiser)

add_api_test (read_data_file_test.cpp)
target_use_datasources (read_data_file_test FILES seqinfo.tsv)
10 changes: 5 additions & 5 deletions test/api/sketch/check_filenames_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ TEST(check_filenames_test, overload)

TEST(check_filenames_test, minimiser_filenames)
{
std::vector<std::string> filenames{data("small.minimiser").string(),
data("small.minimiser").string(),
data("small.minimiser").string()};
std::vector<std::string> filenames{data("dummy.minimiser").string(),
data("dummy.minimiser").string(),
data("dummy.minimiser").string()};

chopper::configuration config;

Expand All @@ -55,7 +55,7 @@ TEST(check_filenames_test, minimiser_filenames)

TEST(check_filenames_test, mixed_filenames_sequence_files)
{
std::vector<std::string> filenames{data("seq2.fa").string(), data("small.minimiser").string()};
std::vector<std::string> filenames{data("seq2.fa").string(), data("dummy.minimiser").string()};

chopper::configuration config;

Expand All @@ -64,7 +64,7 @@ TEST(check_filenames_test, mixed_filenames_sequence_files)

TEST(check_filenames_test, mixed_filenames_minimiser_files)
{
std::vector<std::string> filenames{data("small.minimiser").string(), data("seq2.fa").string()};
std::vector<std::string> filenames{data("dummy.minimiser").string(), data("seq2.fa").string()};

chopper::configuration config;

Expand Down
2 changes: 0 additions & 2 deletions test/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ add_cli_test (cli_chopper_basic_test.cpp)
add_cli_test (cli_chopper_pipeline_test.cpp)
target_use_datasources (cli_chopper_pipeline_test FILES seq1.fa)
target_use_datasources (cli_chopper_pipeline_test FILES small.fa)
target_use_datasources (cli_chopper_pipeline_test FILES small2.fa)
target_use_datasources (cli_chopper_pipeline_test FILES small.split)

add_cli_test (cli_chopper_layout_from_sketch_file.cpp)
target_use_datasources (cli_chopper_layout_from_sketch_file FILES seq1.fa)
Expand Down
10 changes: 5 additions & 5 deletions test/cli/cli_chopper_layout_from_sketch_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ TEST_F(cli_test, chopper_layout_from_sketch_file)
"@ }\n"
"@}\n"
"@HIBF_CONFIG_END\n"
"#TOP_LEVEL_IBF fullest_technical_bin_idx:16\n"
"#TOP_LEVEL_IBF fullest_technical_bin_idx:0\n"
"#USER_BIN_IDX\tTECHNICAL_BIN_INDICES\tNUMBER_OF_TECHNICAL_BINS\n"
"1\t0\t16\n"
"3\t16\t23\n"
"2\t39\t15\n"
"0\t54\t10\n"};
"1\t0\t9\n"
"0\t9\t8\n"
"2\t17\t8\n"
"3\t25\t39\n"};

std::string const actual_file{string_from_file(binning_filename)};
EXPECT_EQ(actual_file, expected_file);
Expand Down
10 changes: 5 additions & 5 deletions test/cli/cli_chopper_pipeline_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ TEST_F(cli_test, chopper_layout2)
"@ }\n"
"@}\n"
"@HIBF_CONFIG_END\n"
"#TOP_LEVEL_IBF fullest_technical_bin_idx:16\n"
"#TOP_LEVEL_IBF fullest_technical_bin_idx:0\n"
"#USER_BIN_IDX\tTECHNICAL_BIN_INDICES\tNUMBER_OF_TECHNICAL_BINS\n"
"1\t0\t16\n"
"3\t16\t23\n"
"2\t39\t15\n"
"0\t54\t10\n"};
"1\t0\t9\n"
"0\t9\t8\n"
"2\t17\t8\n"
"3\t25\t39\n"};

std::string const actual_file{string_from_file(binning_filename)};
EXPECT_EQ(actual_file, expected_file);
Expand Down
20 changes: 10 additions & 10 deletions test/cli/util_display_layout_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ TEST_F(cli_test, display_layout_general)
std::string expected_general_file{
"# Layout: " + layout_filename.string() + "\n" +
R"(tb_index exact_size estimated_size fpr_corrected_size shared_size ub_count kind splits
0 479 483 153 0 2 merged 1
1 466 466 466 0 1 split 1
2 287 289 420 0 1 split 2
3 287 289 420 0 1 split 0
0 32291 32795 10301 0 2 merged 1
1 15984 15884 15984 0 1 split 1
2 17745 17971 25914 0 1 split 2
3 17745 17971 25914 0 1 split 0
)"};

std::string const actual_file{string_from_file(general_filename)};
Expand Down Expand Up @@ -168,10 +168,10 @@ TEST_F(cli_test, display_layout_general_with_shared_kmers)
std::string expected_general_file{
"# Layout: " + layout_filename.string() + "\n" +
R"(tb_index exact_size estimated_size fpr_corrected_size shared_size ub_count kind splits
0 479 483 153 371 2 merged 1
1 466 466 466 0 1 split 1
2 287 289 420 0 1 split 2
3 287 289 420 0 1 split 0
0 32291 32795 10301 0 2 merged 1
1 15984 15884 15984 0 1 split 1
2 17745 17971 25914 0 1 split 2
3 17745 17971 25914 0 1 split 0
)"};

std::string const actual_file{string_from_file(general_filename)};
Expand Down Expand Up @@ -211,8 +211,8 @@ TEST_F(cli_test, display_layout_sizes)
std::string expected_general_file{R"(# Levels: 2
# User bins: 4
LEVEL BIT_SIZE IBFS AVG_LOAD_FACTOR TBS_TOO_BIG AVG_TBS_TOO_BIG_ELEMENTS AVG_MAX_ELEMENTS
0 4832 1 79.44 0 0 479
1 8916 1 80.26 0 0 385
0 325572 1 64.85 0 0 32291
1 354192 1 77.61 0 0 15345
)"};

std::string const actual_file{string_from_file(sizes_filename)};
Expand Down
32 changes: 6 additions & 26 deletions test/data/datasources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,26 @@ cmake_minimum_required (VERSION 3.18)

include (cmake/app_datasources.cmake)

declare_datasource (FILE small_graph.dot URL ${CMAKE_SOURCE_DIR}/test/data/small_graph.dot URL_HASH
SHA256=f573bb45abe677bda78d5f700bd6a9b5f2415f405953f5c085be491e2598f02e
)

declare_datasource (FILE small.fa URL ${CMAKE_SOURCE_DIR}/test/data/small.fa URL_HASH
SHA256=215a646ccd2d156eeabdd792108fc0ba385e244a25218afc095658189d2a3c0d
SHA256=41d7eace7e07335afe6aa2c3b313eacae828e0f42a876fe97bf74a4cef4323f9
)

declare_datasource (FILE seq1.fa URL ${CMAKE_SOURCE_DIR}/test/data/seq1.fa URL_HASH
SHA256=f60b985d9f3be1d3dd6105d62f4321eeb617bc52f4fb0435b016bf1873aa2eac
SHA256=752f6ff662e9c325886aab84db998c63fc89d7ff2f4504ccd686fd853e67a003
)

declare_datasource (FILE seq2.fa URL ${CMAKE_SOURCE_DIR}/test/data/seq2.fa URL_HASH
SHA256=4153dfac5993b6ddeebf76fabeaaaad838b68f4abe0c3c03cc95b9196832af7a
SHA256=c9c402bcb982a7f3ecb0ef8810b8d4ae3050553faa295a6c3e538713199564dd
)

declare_datasource (FILE seq3.fa URL ${CMAKE_SOURCE_DIR}/test/data/seq3.fa URL_HASH
SHA256=aa440a61539216096680e53a1d68b245e5a7cac67e7eca315996d51b863d9915
)

declare_datasource (FILE small2.fa URL ${CMAKE_SOURCE_DIR}/test/data/small2.fa URL_HASH
SHA256=3a444c41f71586d62514eea8faf3c699ac5f2cfce94fd3fc7c3e47d3ff3a8383
SHA256=24a275e4666f815e46d1ccfb135bce5ea794f6630c8ffd9117eb0dcecce9d414
)

declare_datasource (FILE seqinfo.tsv URL ${CMAKE_SOURCE_DIR}/test/data/seqinfo.tsv URL_HASH
SHA256=c6e28cc4ebf4902c41b1c237b1410665994e0fd0b8d8473c38a8107041d78172
)

declare_datasource (FILE small.split URL ${CMAKE_SOURCE_DIR}/test/data/small.split URL_HASH
SHA256=b7f8ae432149580c4be0f349f2e2ee2f33bee44b3cadb436f344a643e5a41945
)

declare_datasource (FILE small.hll URL ${CMAKE_SOURCE_DIR}/test/data/small.hll URL_HASH
SHA256=039d7bdbb70e4d98285c09bbbcb2cd1fafb8038689c270cf231debb248c59206
)

declare_datasource (FILE small2.hll URL ${CMAKE_SOURCE_DIR}/test/data/small2.hll URL_HASH
SHA256=039d7bdbb70e4d98285c09bbbcb2cd1fafb8038689c270cf231debb248c59206
)

declare_datasource (FILE small.minimiser URL ${CMAKE_SOURCE_DIR}/test/data/small.minimiser URL_HASH
SHA256=6262de00ad97113320469ff952e657930d07151bda5174ee3599560eccb6f0e1
declare_datasource (FILE dummy.minimiser URL ${CMAKE_SOURCE_DIR}/test/data/dummy.minimiser URL_HASH
SHA256=7514acab108f7e5dc7cf048690dc153c13b8a2f2df7cab6d755638cd16ea79b1
)
1 change: 1 addition & 0 deletions test/data/dummy.minimiser
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dummy file. This is not a real minimiser file because the current test only checks the filename extension
Loading