Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Dec 15, 2023
1 parent 7049f2c commit b19cfc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
end

@testset "Corner cases" begin
import JSONFBCModels: parse_charge
import JSONFBCModels:
eval_gene_association, flatten_gene_association, parse_charge, sortunique

@test parse_charge(1) == 1
@test parse_charge(2.0) == 2
Expand All @@ -22,4 +23,7 @@ end
@test parse_charge(nothing) == nothing
@test_throws ArgumentError parse_charge("totally positive charge")
@test_throws DomainError parse_charge(["very charged"])
@test_throws DomainError eval_gene_association(:(xor(gene("a"), gene("b"))), _ -> false)
@test_throws DomainError flatten_gene_association(:(xor(gene("a"), gene("b"))))
@test sortunique([3, 2, 2, 1]) == [1, 2, 3]
end

0 comments on commit b19cfc6

Please sign in to comment.