From b6ff10de1f48111ad1db899f8b25e2ba81ab1d05 Mon Sep 17 00:00:00 2001 From: tibvdm Date: Tue, 27 Aug 2024 11:57:04 +0200 Subject: [PATCH] fix tests --- sa-index/src/bounds_cache.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sa-index/src/bounds_cache.rs b/sa-index/src/bounds_cache.rs index 4d359e7..8117117 100644 --- a/sa-index/src/bounds_cache.rs +++ b/sa-index/src/bounds_cache.rs @@ -112,6 +112,13 @@ mod tests { for i in 0..20_usize.pow(5) { let kmer = kmer_cache.index_to_kmer(i); + + if kmer.contains(&b'L') { + let equated_kmer = kmer.iter().map(|&c| if c == b'L' { b'I' } else { c }).collect::>(); + assert_eq!(kmer_cache.kmer_to_index(&kmer), kmer_cache.kmer_to_index(&equated_kmer)); + continue; + } + assert_eq!(kmer_cache.kmer_to_index(&kmer), i); } }