Add tests for Edit sorting

This commit is contained in:
Thomas A. Christensen II 2023-01-10 11:17:26 -06:00
parent 860ce56b34
commit 6119368af3

View file

@ -36,6 +36,15 @@ seq1 = ungap!(dna"--ATGCGTGTTAGCAAC--TTATCGCG")
seq2 = ungap!(dna"TGATGCGTGT-AGCAACACTTATAGCG") seq2 = ungap!(dna"TGATGCGTGT-AGCAACACTTATAGCG")
var = Haplotype(align(seq1, seq2)) var = Haplotype(align(seq1, seq2))
@testset "EditSorting" begin
S = typeof(seq1)
T = eltype(seq1)
@test SequenceVariation.Edit{S,T}(Deletion(1), 1) <
SequenceVariation.Edit{S,T}(Deletion(1), 2)
@test SequenceVariation.Edit{S,T}(Deletion(1), 1) <
SequenceVariation.Edit{S,T}(Deletion(2), 1)
end
@testset "HaplotypeRoundtrip" begin @testset "HaplotypeRoundtrip" begin
for v in variations(var) for v in variations(var)
@test v in var @test v in var