From 6a33ac06a7a325de347950b8bb6a8f5beec782bb Mon Sep 17 00:00:00 2001 From: herbstk Date: Sun, 5 Jan 2020 22:18:36 +0530 Subject: [PATCH] :white_check_mark: Enhanced unit test for rightposition (#37) Added additional tests for SAM.Record and BAM.Record for `rightposition` (and implicitly `alignlength`). --- test/runtests.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index ffb2669..d76d99f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -151,6 +151,10 @@ end @test eof(reader) close(reader) + # rightposition (also implicitly alignlength) + records = collect(open(SAM.Reader, joinpath(samdir, "ce#5b.sam"))) + @test SAM.rightposition(records[6]) == rightposition(records[6]) == 83 + # iterator @test length(collect(open(SAM.Reader, joinpath(samdir, "ce#1.sam")))) == 1 @test length(collect(open(SAM.Reader, joinpath(samdir, "ce#2.sam")))) == 2 @@ -308,6 +312,10 @@ end @test record.tlen == new_record.tlen @test record.data == new_record.data + # rightposition (also implicitly alignlength) + records = collect(open(BAM.Reader, joinpath(bamdir, "ce#5b.bam"))) + @test BAM.rightposition(records[6]) == rightposition(records[6]) == 83 + # iterator @test length(collect(open(BAM.Reader, joinpath(bamdir, "ce#1.bam")))) == 1 @test length(collect(open(BAM.Reader, joinpath(bamdir, "ce#2.bam")))) == 2