Skip to content

Commit 6f96622

Browse files
test: fix pdeps test
Co-authored-by: Aayush Sabharwal <[email protected]>
1 parent 535fd52 commit 6f96622

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/parameter_dependencies.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,18 @@ end
178178
end
179179

180180
struct CallableFoo
181-
p
181+
p::Any
182182
end
183183

184-
(f::CallableFoo)(x) = f.p+x
184+
@register_symbolic CallableFoo(x)
185+
186+
(f::CallableFoo)(x) = f.p + x
185187

186188
@testset "callable parameters" begin
187189
@variables y(t) = 1
188-
@parameters p = 2 (i::CallableFoo)(..)
190+
@parameters p=2 (i::CallableFoo)(..)
189191

190-
eqs = [D(y) ~ i(t)+p]
192+
eqs = [D(y) ~ i(t) + p]
191193
@named model = ODESystem(eqs, t, [y], [p, i];
192194
parameter_dependencies = [i ~ CallableFoo(p)])
193195
sys = structural_simplify(model)

0 commit comments

Comments
 (0)