|
27 | 27 | @test istotal(b*a, a) |
28 | 28 | @test istotal(a, b*a) |
29 | 29 | @test !(b*a <ₑ b+a) |
30 | | -@test a <ₑ Term(^, [1,-1]) |
| 30 | +@test Term(^, [1,-1]) <ₑ a |
31 | 31 | @test istotal(a, Term(^, [1,-1])) |
32 | 32 |
|
33 | | -@testset "operator order" begin |
34 | | - fs = (*, ^, /, \, -, +) |
35 | | - for i in 1:length(fs) |
36 | | - f = fs[i] |
37 | | - @test f(a, b) <ₑ f(b, c) |
38 | | - @test istotal(f(a, b), f(b, c)) |
39 | | - @test !(f(b, b) <ₑ f(b, b)) |
40 | | - @test istotal(f(b, b), f(b, b)) |
41 | | - @test !(f(b, c) <ₑ f(a, b)) |
42 | | - @test istotal(f(b, c), f(a, b)) |
43 | | - |
44 | | - @test f(1, b) <ₑ f(2, b) |
45 | | - @test !(f(2, b) <ₑ f(1, b)) |
46 | | - @test istotal(f(1, b), f(2, b)) |
47 | | - @test istotal(f(2, b), f(1, b)) |
48 | | - @test b <ₑ f(2,b) && !(f(2,b) <ₑ b) |
49 | | - |
50 | | - for j in i+1:length(fs) |
51 | | - g = fs[j] |
52 | | - @test istotal(f(a, b), g(a, b)) |
53 | | - end |
54 | | - end |
55 | | -end |
56 | | - |
57 | 33 | @testset "callable variable order" begin |
58 | 34 | @syms z() ρ() |
59 | 35 |
|
|
84 | 60 | @testset "transitivity" begin |
85 | 61 | # issue #160 |
86 | 62 | @syms σ x y z |
87 | | - expr = σ*sin(x + -1y)*(sin(z)^(-1))*(-1x + y) |
88 | | - args = arguments(expr) |
| 63 | + expr = σ*sin(x + -1y)*(sin(z)^2)*(-1x + y) |
| 64 | + args = sort(arguments(expr), lt=<ₑ) |
89 | 65 | @test all(((a, b), )->a <ₑ b, combinations(args, 2)) |
90 | 66 | end |
0 commit comments