Skip to content

Commit 1e9e216

Browse files
Merge pull request #1010 from AayushSabharwal/as/remove-bad-test
test: remove unnecessarily specific parameter type annotations
2 parents 87d02ff + d433da6 commit 1e9e216

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/reactionsystem_core/parameter_type_designation.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ t = default_t()
1717
# Declares a simple model to run tests on.
1818
begin
1919
t = default_t()
20-
@parameters p1 p2::Float64 p3::Int64 p4::Float32 p5::Rational{Int64}
21-
@parameters d1 d2::Float64 = 1.2 d3::Int64 = 2 [description = "A parameter"] d4::Rational{Int64} d5::Float32
20+
@parameters p1 p2 p3::Int64 p4 p5::Rational{Int64}
21+
@parameters d1 d2 = 1.2 d3::Int64 = 2 [description = "A parameter"] d4::Rational{Int64} d5
2222
@species X1(t) X2(t) X3(t) X4(t) X5(t)
2323

2424
rxs = [
@@ -49,14 +49,14 @@ end
4949
let
5050
@test Symbolics.unwrap(rs.p1) isa BasicSymbolic{Real}
5151
@test Symbolics.unwrap(rs.d1) isa BasicSymbolic{Real}
52-
@test Symbolics.unwrap(rs.p2) isa BasicSymbolic{Float64}
53-
@test Symbolics.unwrap(rs.d2) isa BasicSymbolic{Float64}
52+
@test Symbolics.unwrap(rs.p2) isa BasicSymbolic{Real}
53+
@test Symbolics.unwrap(rs.d2) isa BasicSymbolic{Real}
5454
@test Symbolics.unwrap(rs.p3) isa BasicSymbolic{Int64}
5555
@test Symbolics.unwrap(rs.d3) isa BasicSymbolic{Int64}
56-
@test Symbolics.unwrap(rs.p4) isa BasicSymbolic{Float32}
56+
@test Symbolics.unwrap(rs.p4) isa BasicSymbolic{Real}
5757
@test Symbolics.unwrap(rs.d4) isa BasicSymbolic{Rational{Int64}}
5858
@test Symbolics.unwrap(rs.p5) isa BasicSymbolic{Rational{Int64}}
59-
@test Symbolics.unwrap(rs.d5) isa BasicSymbolic{Float32}
59+
@test Symbolics.unwrap(rs.d5) isa BasicSymbolic{Real}
6060
end
6161

6262
# Tests that simulations with differentially typed variables yields correct results.
@@ -96,10 +96,10 @@ let
9696
@test unwrap(mtk_struct.ps[d2]) isa Float64
9797
@test unwrap(mtk_struct.ps[p3]) isa Int64
9898
@test unwrap(mtk_struct.ps[d3]) isa Int64
99-
@test unwrap(mtk_struct.ps[p4]) isa Float32
99+
@test unwrap(mtk_struct.ps[p4]) isa Float64
100100
@test unwrap(mtk_struct.ps[d4]) isa Rational{Int64}
101101
@test unwrap(mtk_struct.ps[p5]) isa Rational{Int64}
102-
@test unwrap(mtk_struct.ps[d5]) isa Float32
102+
@test unwrap(mtk_struct.ps[d5]) isa Float64
103103

104104
# Checks that all parameters have the correct value.
105105
@test unwrap(mtk_struct.ps[p1]) == 1.0
@@ -130,4 +130,4 @@ let
130130
@test unwrap(mtk_struct[X4]) == 0.4
131131
@test unwrap(mtk_struct[X5]) == 0.5
132132
end
133-
end
133+
end

0 commit comments

Comments
 (0)