Skip to content

Commit 80332f7

Browse files
committed
Fix tests
1 parent 7e5ef70 commit 80332f7

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,8 @@ end
808808

809809
function fold_constants(ex)
810810
if istree(ex)
811-
similarterm(ex, operations(ex), map(fold_constants, arguments(ex)),
812-
symtype(expr); metadata = metadata(expr))
811+
similarterm(ex, operation(ex), map(fold_constants, arguments(ex)),
812+
symtype(ex); metadata = metadata(ex))
813813
elseif issym(ex) && isconstant(ex)
814814
getdefault(ex)
815815
else

test/constants.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ MT.get_unit(β)
3030
@variables t [unit = u"s"] x(t) [unit = u"m"]
3131
D = Differential(t)
3232
eqs = [D(x) ~ β]
33-
sys = ODESystem(eqs, name = :sys)
34-
# Note that the equation won't unit-check now
35-
# b/c the literal value doesn't have units on it
36-
# Testing that units checking is bypassed in the constructors
33+
@named sys = ODESystem(eqs)
3734
simp = structural_simplify(sys)
38-
@test_throws MT.ValidationError MT.check_units(simp.eqs...)
3935

4036
@test isempty(MT.collect_constants(nothing))

0 commit comments

Comments
 (0)