Skip to content

Commit de7178c

Browse files
committed
update substitute test
1 parent 90bace8 commit de7178c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ using SafeTestsets, Test
2525
@safetestset "Array of Array Test" begin include("build_function_arrayofarray.jl") end
2626
#@testset "Latexify recipes Test" begin include("latexify.jl") end
2727
@testset "Distributed Test" begin include("distributed.jl") end
28+
@testset "Variable Utils Test" begin include("variable_utils.jl") end

test/variable_utils.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ sol = ModelingToolkit.get_variables(expr)
88
@parameters γ
99
s = α => γ
1010
expr = (((1 / β - 1) + δ) / α) ^ (1 /- 1))
11-
ModelingToolkit.substitute(expr, s)
11+
sol = ModelingToolkit.substitute(expr, s)
1212
new = (((1 / β - 1) + δ) / γ) ^ (1 /- 1))
13-
@test isequal(expr, new)
13+
@test iszero(simplify(sol - new))

0 commit comments

Comments
 (0)