Skip to content

Commit

Permalink
test: fix pdeps test
Browse files Browse the repository at this point in the history
Co-authored-by: Aayush Sabharwal <[email protected]>
  • Loading branch information
SebastianM-C and AayushSabharwal committed Oct 5, 2024
1 parent 535fd52 commit 6f96622
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/parameter_dependencies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,18 @@ end
end

struct CallableFoo
p
p::Any
end

(f::CallableFoo)(x) = f.p+x
@register_symbolic CallableFoo(x)

(f::CallableFoo)(x) = f.p + x

@testset "callable parameters" begin
@variables y(t) = 1
@parameters p = 2 (i::CallableFoo)(..)
@parameters p=2 (i::CallableFoo)(..)

eqs = [D(y) ~ i(t)+p]
eqs = [D(y) ~ i(t) + p]
@named model = ODESystem(eqs, t, [y], [p, i];
parameter_dependencies = [i ~ CallableFoo(p)])
sys = structural_simplify(model)
Expand Down

0 comments on commit 6f96622

Please sign in to comment.