Skip to content

Commit 93220f3

Browse files
committed
update tests
1 parent b3b471c commit 93220f3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/reactionsystem_core/reaction.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,23 @@ let
251251
collect_vars!(us, ps, rx, t)
252252
@test us == Set((A, B, C, D, E, F))
253253
@test ps == Set((k1, k2, η))
254+
end
255+
256+
# tests for PhysicalScales
257+
let
258+
t = default_t()
259+
@species A(t) B(t) C(t)
260+
@parameters k1, k2
261+
262+
rx = Reaction(k1, [A], [B], [2], [1]; metadata = [:physical_scale = PhysicalScale.Jump])
263+
@test has_physical_scale(rx)
264+
@test get_physical_scale(rx) == PhysicalScale.Jump
265+
266+
rx2 = Reaction(k1, [A], [B], [2], [1])
267+
@test has_physical_scale(rx2) == false
268+
269+
rx3 = Reaction(k1, [A], [B], [2], [1];
270+
metadata = [:physical_scale = PhysicalScale.Jump, :noise_scaling => 0.1])
271+
@test has_physical_scale(rx3)
272+
@test get_physical_scale(rx3) == PhysicalScale.Jump
254273
end

0 commit comments

Comments
 (0)