Skip to content

Commit 01d5429

Browse files
committed
SyncmerIterator test
1 parent 04e8071 commit 01d5429

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/test_randstrobes.cpp

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "randstrobes.hpp"
33

44

5-
TEST_CASE("test RefRandstrobe constructor") {
5+
TEST_CASE("RefRandstrobe constructor") {
66
randstrobe_hash_t hash = 0x1234567890ABCDEF & RANDSTROBE_HASH_MASK;
77
uint32_t position = ~0u;
88
uint32_t ref_index = RefRandstrobe::max_number_of_references - 1;
@@ -16,3 +16,19 @@ TEST_CASE("test RefRandstrobe constructor") {
1616
CHECK(rr.strobe2_offset() == offset);
1717
CHECK(rr.first_strobe_is_main() == first_strobe_is_main);
1818
}
19+
20+
TEST_CASE("SyncmerIterator") {
21+
std::string seq{"AAAAAAAAAAAAAAAAAAAA"};
22+
CHECK(seq.size() == 20);
23+
24+
SyncmerParameters parameters{8, 4};
25+
CHECK(parameters.t_syncmer == 3);
26+
SyncmerIterator si{seq, parameters};
27+
28+
Syncmer syncmer;
29+
syncmer = si.next();
30+
CHECK(!syncmer.is_end());
31+
CHECK(syncmer.position == 2ul);
32+
33+
34+
}

0 commit comments

Comments
 (0)