Skip to content

Commit

Permalink
Fix constants check
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Nov 11, 2023
1 parent f793c0b commit ffd8a5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/constants.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using ModelingToolkit, OrdinaryDiffEq, Unitful
using Test
MT = ModelingToolkit
UMT = ModelingToolkit.UnitfulUnitCheck

@constants a = 1
@test_throws MT.ArgumentError @constants b
Expand All @@ -25,7 +26,7 @@ simp = structural_simplify(sys)

#Constant with units
@constants β=1 [unit = u"m/s"]
MT.get_unit(β)
UMT.get_unit(β)
@test MT.isconstant(β)
@variables t [unit = u"s"] x(t) [unit = u"m"]
D = Differential(t)
Expand Down

0 comments on commit ffd8a5f

Please sign in to comment.