File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ using Test
4
4
@Var a= 1.0 b
5
5
a1 = Variable (:a ,1.0 )
6
6
@test a1 == a
7
+ @test Expr (a) == :a
7
8
8
9
@Var begin
9
10
a = 1.0
@@ -20,6 +21,10 @@ z1 = DependentVariable(:z,dependents = [t])
20
21
@test x1 == x
21
22
@test y1 == y
22
23
@test z1 == z
24
+ @test Expr (x) == :x
25
+ @test Expr (y) == :y
26
+ @test Expr (z) == :z
27
+
23
28
@IVar begin
24
29
t
25
30
s = cos (2.5 )
@@ -28,11 +33,19 @@ t1 = IndependentVariable(:t)
28
33
s1 = IndependentVariable (:s , cos (2.5 ))
29
34
@test t1 == t
30
35
@test s1 == s
36
+ @test Expr (t) == :t
37
+ @test Expr (s) == :s
38
+ @test Expr (cos (t + sin (s))) == :(cos (t + sin (s)))
39
+
31
40
@Deriv D'' ~ t
32
41
D1 = Differential (t, 2 )
33
42
@test D1 == D
43
+ @test Expr (D) == D
44
+
34
45
@Const c= 0 v= 2
35
46
c1 = Constant (0 )
36
47
v1 = Constant (2 )
37
48
@test c1 == c
38
49
@test v1 == v
50
+ @test Expr (c) == 0
51
+ @test Expr (v) == 2
You can’t perform that action at this time.
0 commit comments