Skip to content

Commit 4986b86

Browse files
committed
readded util tests
1 parent d72c7de commit 4986b86

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

test/utils_test.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ using MethodOfLines, Test, ModelingToolkit
77

88
Dx = Differential(x)
99
eq = Dt(u(t,x)) ~ -Dx(u(t,x))
10-
@test first(DiffEqOperators.differential_order(eq.rhs, x.val)) == 1
11-
@test isempty(DiffEqOperators.differential_order(eq.rhs, t.val))
12-
@test first(DiffEqOperators.differential_order(eq.lhs, t.val)) == 1
13-
@test isempty(DiffEqOperators.differential_order(eq.lhs, x.val))
10+
@test first(MethodOfLines.differential_order(eq.rhs, x.val)) == 1
11+
@test isempty(MethodOfLines.differential_order(eq.rhs, t.val))
12+
@test first(MethodOfLines.differential_order(eq.lhs, t.val)) == 1
13+
@test isempty(MethodOfLines.differential_order(eq.lhs, x.val))
1414

1515
Dxx = Differential(x)^2
1616
eq = Dt(u(t,x)) ~ Dxx(u(t,x))
17-
@test first(DiffEqOperators.differential_order(eq.rhs, x.val)) == 2
18-
@test isempty(DiffEqOperators.differential_order(eq.rhs, t.val))
19-
@test first(DiffEqOperators.differential_order(eq.lhs, t.val)) == 1
20-
@test isempty(DiffEqOperators.differential_order(eq.lhs, x.val))
17+
@test first(MethodOfLines.differential_order(eq.rhs, x.val)) == 2
18+
@test isempty(MethodOfLines.differential_order(eq.rhs, t.val))
19+
@test first(MethodOfLines.differential_order(eq.lhs, t.val)) == 1
20+
@test isempty(MethodOfLines.differential_order(eq.lhs, x.val))
2121

2222
Dxxxx = Differential(x)^4
2323
eq = Dt(u(t,x)) ~ -Dxxxx(u(t,x))
24-
@test first(DiffEqOperators.differential_order(eq.rhs, x.val)) == 4
25-
@test isempty(DiffEqOperators.differential_order(eq.rhs, t.val))
26-
@test first(DiffEqOperators.differential_order(eq.lhs, t.val)) == 1
27-
@test isempty(DiffEqOperators.differential_order(eq.lhs, x.val))
24+
@test first(MethodOfLines.differential_order(eq.rhs, x.val)) == 4
25+
@test isempty(MethodOfLines.differential_order(eq.rhs, t.val))
26+
@test first(MethodOfLines.differential_order(eq.lhs, t.val)) == 1
27+
@test isempty(MethodOfLines.differential_order(eq.lhs, x.val))
2828
end
2929

3030
@testset "count differentials 2D" begin
@@ -35,12 +35,12 @@ end
3535
Dt = Differential(t)
3636

3737
eq = Dt(u(t,x,y)) ~ Dxx(u(t,x,y)) + Dyy(u(t,x,y))
38-
@test first(DiffEqOperators.differential_order(eq.rhs, x.val)) == 2
39-
@test first(DiffEqOperators.differential_order(eq.rhs, y.val)) == 2
40-
@test isempty(DiffEqOperators.differential_order(eq.rhs, t.val))
41-
@test first(DiffEqOperators.differential_order(eq.lhs, t.val)) == 1
42-
@test isempty(DiffEqOperators.differential_order(eq.lhs, x.val))
43-
@test isempty(DiffEqOperators.differential_order(eq.lhs, y.val))
38+
@test first(MethodOfLines.differential_order(eq.rhs, x.val)) == 2
39+
@test first(MethodOfLines.differential_order(eq.rhs, y.val)) == 2
40+
@test isempty(MethodOfLines.differential_order(eq.rhs, t.val))
41+
@test first(MethodOfLines.differential_order(eq.lhs, t.val)) == 1
42+
@test isempty(MethodOfLines.differential_order(eq.lhs, x.val))
43+
@test isempty(MethodOfLines.differential_order(eq.lhs, y.val))
4444
end
4545

4646
@testset "count with mixed terms" begin
@@ -53,8 +53,8 @@ end
5353
Dt = Differential(t)
5454

5555
eq = Dt(u(t,x,y)) ~ Dxx(u(t,x,y)) + Dyy(u(t,x,y)) + Dx(Dy(u(t,x,y)))
56-
@test DiffEqOperators.differential_order(eq.rhs, x.val) == Set([2, 1])
57-
@test DiffEqOperators.differential_order(eq.rhs, y.val) == Set([2, 1])
56+
@test MethodOfLines.differential_order(eq.rhs, x.val) == Set([2, 1])
57+
@test MethodOfLines.differential_order(eq.rhs, y.val) == Set([2, 1])
5858
end
5959

6060
@testset "Kuramoto–Sivashinsky equation" begin
@@ -70,5 +70,5 @@ end
7070
β = 4
7171
γ = 1
7272
eq = Dt(u(x,t)) + u(x,t)*Dx(u(x,t)) + α*Dx2(u(x,t)) + β*Dx3(u(x,t)) + γ*Dx4(u(x,t)) ~ 0
73-
@test DiffEqOperators.differential_order(eq.lhs, x.val) == Set([4, 3, 2, 1])
73+
@test MethodOfLines.differential_order(eq.lhs, x.val) == Set([4, 3, 2, 1])
7474
end

0 commit comments

Comments
 (0)