Skip to content

Commit

Permalink
FASTA tests: Part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Jul 18, 2022
1 parent 5968545 commit 6ec73c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 4 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name = "FASTX"
uuid = "c2308a5c-f048-11e8-3e8a-31650f418d12"
authors = [
"Sabrina J. Ward <sabrinajward@protonmail.com>",
"Jakob N. Nissen <jakobnybonissen@gmail.com>"
]
authors = ["Sabrina J. Ward <sabrinajward@protonmail.com>", "Jakob N. Nissen <jakobnybonissen@gmail.com>"]
version = "1.3.0"

[deps]
Expand All @@ -21,11 +18,12 @@ BioSequences = "3"
BioSymbols = "5"
StringViews = "1"
TranscodingStreams = "0.9.5"
julia = "1.6" # LTS
julia = "1.6"

[extras]
FormatSpecimens = "3372ea36-2a1a-11e9-3eb7-996970b6ffbd"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "FormatSpecimens"]
test = ["Test", "FormatSpecimens", "Random"]
2 changes: 1 addition & 1 deletion src/fasta/record.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,5 @@ end

# TODO: Base's hash does not hash all elements. Do we have a better implementation?
function Base.hash(record::Record, h::UInt)
hash(record.data, h objectid(Record))
hash(view(record.data, filled(record)), h objectid(Record))
end
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import BioSequences:
DNA_G,
Alphabet

@testset "FASTA" begin
include("fasta.jl")
end

#=
@testset "FASTA" begin
@testset "Record" begin
record = FASTA.Record()
Expand Down Expand Up @@ -260,6 +265,7 @@ import BioSequences:
end
end
end
=#

@testset "FASTQ" begin
@test isa(FASTQ.Record("1", dna"AA", UInt8[10, 11]), FASTQ.Record)
Expand Down

0 comments on commit 6ec73c5

Please sign in to comment.