Skip to content

Commit

Permalink
Merge pull request #236 from zdroid/numspecies
Browse files Browse the repository at this point in the history
Use numspecies and numparams in API tests
  • Loading branch information
isaacsas committed Aug 3, 2020
2 parents d42d1b3 + eafb625 commit abe2cf6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ specset = Set([S.op =>1, I.op => 2, R.op => 3])
pset = Set([k1.op => 1, k2.op => 2])
@test issetequal(pset, paramsmap(rs))

rxs2 = [Reaction(k2, [I], [R], [1], [1]),
rxs2 = [Reaction(k2, [I], [R], [1], [1]),
Reaction(k1, [S,I], [I], [1,1], [2])]
rs2 = ReactionSystem(rxs2, t, [R,I,S], [k2,k1])
@test rs == rs2
Expand Down Expand Up @@ -43,10 +43,10 @@ rs = ReactionSystem(rxs, t, [S,I,R], [k1,k2])
deps = [s.op for s in dependents(rxs[2], rs)]
@test isequal(deps, [R.op,I.op])
addspecies!(rs, Variable(:S))
@test length(species(rs)) == 3
@test numspecies(rs) == 3
addspecies!(rs, Variable(:S), disablechecks=true)
@test length(species(rs)) == 4
@test numspecies(rs) == 4
addparam!(rs, Variable(:k1))
@test length(params(rs)) == 2
@test numparams(rs) == 2
addparam!(rs, Variable(:k1), disablechecks=true)
@test length(params(rs)) == 3
@test numparams(rs) == 3

0 comments on commit abe2cf6

Please sign in to comment.