Skip to content

Commit bee0ad7

Browse files
committed
fix tests
1 parent c7329f1 commit bee0ad7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/rect.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ end
4040
function jacobimatrix(::Val{1}, P::RectPolynomial)
4141
A,B = P.args
4242
X = jacobimatrix(A)
43-
P * KronTrav(Eye{eltype(X)}(∞), X)
43+
KronTrav(Eye{eltype(X)}(∞), X)
4444
end
4545
# Actually Jyᵀ
4646
function jacobimatrix(::Val{2}, P::RectPolynomial)
4747
A,B = P.args
4848
Y = jacobimatrix(B)
49-
P * KronTrav(Y, Eye{eltype(Y)}(∞))
49+
KronTrav(Y, Eye{eltype(Y)}(∞))
5050
end
5151
@simplify function *(Dx::PartialDerivative{1}, P::RectPolynomial)
5252
A,B = P.args

test/test_rect.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ using ContinuumArrays: plotgridvalues
5151
Y = jacobimatrix(Val{2}(), TU)
5252
𝐱 = axes(TU, 1)
5353
x, y = first.(𝐱), last.(𝐱)
54-
@test_broken TU \ (x .* TU) # Should create X, but it fails
55-
@test_broken TU \ (y .* TU) # Should create Y, but it fails
54+
N = 10
55+
KR = Block.(1:N)
56+
@test (TU \ (x .* TU))[KR,KR] == X[KR,KR]
57+
@test (TU \ (y .* TU))[KR,KR] == Y[KR,KR]
5658
f = expand(TU, splat((x,y) -> exp(x*cos(y-0.1))))
5759
g = expand(TU, splat((x,y) -> x*exp(x*cos(y-0.1))))
5860
h = expand(TU, splat((x,y) -> y*exp(x*cos(y-0.1))))
59-
N = 10
60-
@test (TU \ (X * (TU \ f)))[Block.(1:N)] (TU \ g)[Block.(1:N)]
61-
@test (TU \ (Y * (TU \ f)))[Block.(1:N)] (TU \ h)[Block.(1:N)]
61+
@test (X * (TU \ f))[KR] (TU \ g)[KR]
62+
@test (Y * (TU \ f))[KR] (TU \ h)[KR]
6263
end
6364

6465
@testset "Conversion" begin

0 commit comments

Comments
 (0)