Skip to content

Commit 30d6baf

Browse files
committed
add test
1 parent a5cb22c commit 30d6baf

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/make_model.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ rng = StableRNG(12345)
88
include("test_networks.jl")
99

1010

11-
### Debugg functions ###
12-
11+
### Debug functions ###
1312
opname(x) = istree(x) ? nameof(operation(x)) : nameof(x)
14-
1513
alleq(xs,ys) = all(isequal(x,y) for (x, y) in zip(xs, ys))
1614

1715
# Gets all the reactants in a set of equations.
@@ -405,3 +403,13 @@ rn = @reaction_network begin
405403
k2, I --> R
406404
end k1 k2
407405
@test isequal(opname(species(rn)[2]),:I)
406+
407+
408+
# test names work
409+
rn = @reaction_network SIR1 begin
410+
k1, S + I --> 2I
411+
k2, I --> R
412+
end k1 k2
413+
@test nameof(rn) == :SIR1
414+
415+

0 commit comments

Comments
 (0)