Skip to content

Commit fa0f389

Browse files
committed
Update runtests.jl
1 parent a6e64c5 commit fa0f389

File tree

1 file changed

+0
-111
lines changed

1 file changed

+0
-111
lines changed

test/runtests.jl

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -284,56 +284,6 @@ end
284284

285285

286286
@testset "Algebra" begin
287-
@testset "BandedMatrix" begin
288-
A = BandedMatrix(-3 => Fill(7 / 10, ∞), -2 => 1:∞, 1 => Fill(2im, ∞))
289-
@test A isa BandedMatrix{ComplexF64}
290-
@test A[1:10, 1:10] == diagm(-3 => Fill(7 / 10, 7), -2 => 1:8, 1 => Fill(2im, 9))
291-
292-
A = BandedMatrix(0 => Vcat([1, 2, 3], Zeros(∞)), 1 => Vcat(1, Zeros(∞)))
293-
@test A[1, 2] == 1
294-
295-
A = BandedMatrix(-3 => Fill(7 / 10, ∞), -2 => Fill(1, ∞), 1 => Fill(2im, ∞))
296-
Ac = BandedMatrix(A')
297-
At = BandedMatrix(transpose(A))
298-
@test Ac[1:10, 1:10] (A')[1:10, 1:10] A[1:10, 1:10]'
299-
@test At[1:10, 1:10] transpose(A)[1:10, 1:10] transpose(A[1:10, 1:10])
300-
301-
A = BandedMatrix(-1 => Vcat(Float64[], Fill(1 / 4, ∞)), 0 => Vcat([1.0 + im], Fill(0, ∞)), 1 => Vcat(Float64[], Fill(1, ∞)))
302-
@test MemoryLayout(typeof(view(A.data, :, 1:10))) == ApplyLayout{typeof(hcat)}()
303-
Ac = BandedMatrix(A')
304-
At = BandedMatrix(transpose(A))
305-
@test Ac[1:10, 1:10] (A')[1:10, 1:10] A[1:10, 1:10]'
306-
@test At[1:10, 1:10] transpose(A)[1:10, 1:10] transpose(A[1:10, 1:10])
307-
308-
A = BandedMatrix(-2 => Vcat(Float64[], Fill(1 / 4, ∞)), 0 => Vcat([1.0 + im, 2, 3], Fill(0, ∞)), 1 => Vcat(Float64[], Fill(1, ∞)))
309-
Ac = BandedMatrix(A')
310-
At = BandedMatrix(transpose(A))
311-
@test Ac[1:10, 1:10] (A')[1:10, 1:10] A[1:10, 1:10]'
312-
@test At[1:10, 1:10] transpose(A)[1:10, 1:10] transpose(A[1:10, 1:10])
313-
314-
A = _BandedMatrix(Fill(1, 4, ∞), ℵ₀, 1, 2)
315-
@test A^2 isa BandedMatrix
316-
@test (A^2)[1:10, 1:10] == (A*A)[1:10, 1:10] == (A[1:100, 1:100]^2)[1:10, 1:10]
317-
@test A^3 isa ApplyMatrix{<:Any,typeof(*)}
318-
@test (A^3)[1:10, 1:10] == (A*A*A)[1:10, 1:10] == ((A*A)*A)[1:10, 1:10] == (A*(A*A))[1:10, 1:10] == (A[1:100, 1:100]^3)[1:10, 1:10]
319-
320-
@testset "∞ x finite" begin
321-
A = BandedMatrix(1 => 1:∞) + BandedMatrix(-1 => Fill(2, ∞))
322-
B = _BandedMatrix(randn(3, 5), ℵ₀, 1, 1)
323-
324-
@test lmul!(2.0, copy(B)')[:, 1:10] == (2B')[:, 1:10]
325-
326-
@test_throws ArgumentError BandedMatrix(A)
327-
@test A * B isa MulMatrix
328-
@test B'A isa MulMatrix
329-
330-
@test all(diag(A[1:6, 1:6]) .=== zeros(6))
331-
332-
@test (A*B)[1:7, 1:5] A[1:7, 1:6] * B[1:6, 1:5]
333-
@test (B'A)[1:5, 1:7] (B')[1:5, 1:6] * A[1:6, 1:7]
334-
end
335-
end
336-
337287
@testset "BlockTridiagonal" begin
338288
A = BlockTridiagonal(Vcat([fill(1.0, 2, 1), Matrix(1.0I, 2, 2), Matrix(1.0I, 2, 2), Matrix(1.0I, 2, 2)], Fill(Matrix(1.0I, 2, 2), ∞)),
339289
Vcat([zeros(1, 1)], Fill(zeros(2, 2), ∞)),
@@ -369,67 +319,6 @@ end
369319
@test_broken B[Block(1, 3)] == Zeros(2, 2)
370320
end
371321

372-
@testset "Fill" begin
373-
A = _BandedMatrix(Ones(1, ∞), ℵ₀, -1, 1)
374-
@test 1.0 .* A isa BandedMatrix{Float64,<:Fill}
375-
@test Zeros(∞) .* A Zeros(∞, ∞) .* A A .* Zeros(1, ∞) A .* Zeros(∞, ∞) Zeros(∞, ∞)
376-
@test Ones(∞) .* A isa BandedMatrix{Float64,<:Ones}
377-
@test A .* Ones(1, ∞) isa BandedMatrix{Float64,<:Ones}
378-
@test 2.0 .* A isa BandedMatrix{Float64,<:Fill}
379-
@test A .* 2.0 isa BandedMatrix{Float64,<:Fill}
380-
@test Eye(∞) * A isa BandedMatrix{Float64,<:Ones}
381-
@test A * Eye(∞) isa BandedMatrix{Float64,<:Ones}
382-
383-
@test A * A isa BandedMatrix
384-
@test (A*A)[1:10, 1:10] == BandedMatrix(2 => Ones(8))
385-
386-
= _BandedMatrix(Fill(1, 1, ∞), ℵ₀, -1, 1)
387-
@test A *isa BandedMatrix
388-
@test* A isa BandedMatrix
389-
@test*isa BandedMatrix
390-
391-
B = _BandedMatrix(Ones(1, 10), ℵ₀, -1, 1)
392-
C = _BandedMatrix(Ones(1, 10), 10, -1, 1)
393-
D = _BandedMatrix(Ones(1, ∞), 10, -1, 1)
394-
395-
@test (A*B)[1:10, 1:10] == (B*C)[1:10, 1:10] == (D*A)[1:10, 1:10] == D * B == (C*D)[1:10, 1:10] == BandedMatrix(2 => Ones(8))
396-
end
397-
398-
@testset "Banded Broadcast" begin
399-
A = _BandedMatrix((1:∞)', ℵ₀, -1, 1)
400-
@test 2.0 .* A isa BandedMatrix{Float64,<:Adjoint}
401-
@test A .* 2.0 isa BandedMatrix{Float64,<:Adjoint}
402-
@test Eye(∞) * A isa BandedMatrix{Float64,<:Adjoint}
403-
@test A * Eye(∞) isa BandedMatrix{Float64,<:Adjoint}
404-
A = _BandedMatrix(Vcat((1:∞)', Ones(1, ∞)), ℵ₀, 0, 1)
405-
@test 2.0 .* A isa BandedMatrix
406-
@test A .* 2.0 isa BandedMatrix
407-
@test Eye(∞) * A isa BandedMatrix
408-
@test A * Eye(∞) isa BandedMatrix
409-
b = 1:
410-
@test bandwidths(b .* A) == (0, 1)
411-
412-
@test colsupport(b .* A, 1) == 1:1
413-
@test Base.replace_in_print_matrix(b .* A, 2, 1, "0.0") == ""
414-
@test bandwidths(A .* b) == (0, 1)
415-
@test A .* b' isa BroadcastArray
416-
@test bandwidths(A .* b') == bandwidths(A .* b')
417-
@test colsupport(A .* b', 3) == 2:3
418-
419-
A = _BandedMatrix(Ones{Int}(1, ∞), ℵ₀, 0, 0)'
420-
B = _BandedMatrix((-2:-2:-∞)', ℵ₀, -1, 1)
421-
C = Diagonal(2 ./ (1:2:∞))
422-
@test bandwidths(A * (B * C)) == (-1, 1)
423-
@test bandwidths((A * B) * C) == (-1, 1)
424-
425-
A = _BandedMatrix(Ones{Int}(1, ∞), ℵ₀, 0, 0)'
426-
B = _BandedMatrix((-2:-2:-∞)', ℵ₀, -1, 1)
427-
@test MemoryLayout(A + B) isa BroadcastBandedLayout{typeof(+)}
428-
@test MemoryLayout(2 * (A + B)) isa BroadcastBandedLayout{typeof(*)}
429-
@test bandwidths(A + B) == (0, 1)
430-
@test bandwidths(2 * (A + B)) == (0, 1)
431-
end
432-
433322
@testset "Triangle OP recurrences" begin
434323
k = mortar(Base.OneTo.(1:∞))
435324
n = mortar(Fill.(1:∞, 1:∞))

0 commit comments

Comments
 (0)