Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .git-blame-ignore-revs # switch formatter to Runic
90f3ae3686d5e64b38dbad7bce7c1867be0a4b57
2 changes: 1 addition & 1 deletion src/sam.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function validate_array(T::Type, mem::ImmutableMemoryView{UInt8})::Bool
length(mem) == 1 && return false
@inbounds(mem[1]) == UInt8(',') || return false
return all(split_each(@inbounds(mem[2:end]), UInt8(','))) do bytes
!isnothing(tryparse(T, bytes))
!isnothing(tryparse(T, StringView(bytes)))
end
end

Expand Down
12 changes: 12 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ end
@test isempty(MemoryView(aux))
end

@testset "isvalid" begin
s = "ab:i:4\tka:A:m\ttp:f:0.2123\tmn:H:13af\tAC:B:c,3,2,-34,25,62,-123"
aux = SAM.Auxiliary(collect(codeunits(s)), 1)
@test isvalid(aux)
end

end # SAM

@testset "BAM" begin
Expand Down Expand Up @@ -519,6 +525,12 @@ end # SAM
end
end

@testset "isvalid" begin
s = "abAcbbHafde01\0kaZabcdefgh\0kkC8mnBC\3\0\0\0abc"
aux = BAM.Auxiliary(collect(codeunits(s)), 1)
@test isvalid(aux)
end

end # BAM

@testset "Arrays" begin
Expand Down
Loading