Skip to content

Commit 94e164e

Browse files
committed
Mark broken tests as broken
1 parent 3309308 commit 94e164e

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ LabelledNumbers = "f856a3a6-4152-4ec4-b2a7-02c1a55d7993"
2525
TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
2626

2727
[extensions]
28-
BlockSparseArraysAdaptExt = "Adapt"
2928
BlockSparseArraysTensorAlgebraExt = ["LabelledNumbers", "TensorAlgebra"]
3029

3130
[compat]

src/BlockSparseArrays.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ include("abstractblocksparsearray/broadcast.jl")
3535
include("abstractblocksparsearray/map.jl")
3636
include("abstractblocksparsearray/linearalgebra.jl")
3737
include("abstractblocksparsearray/cat.jl")
38+
include("abstractblocksparsearray/adapt.jl")
3839

3940
# functions specifically for BlockSparseArray
4041
include("blocksparsearray/defaults.jl")
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
module BlockSparseArraysAdaptExt
21
using Adapt: Adapt, adapt
3-
using BlockSparseArrays: AbstractBlockSparseArray, map_stored_blocks
42
Adapt.adapt_structure(to, x::AbstractBlockSparseArray) = map_stored_blocks(adapt(to), x)
5-
end

test/test_svd.jl

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
using Test
2-
using BlockSparseArrays
3-
using BlockSparseArrays: BlockSparseArray, svd, BlockDiagonal, eachblockstoredindex
4-
using BlockArrays
5-
using Random
1+
using BlockArrays: Block, BlockedMatrix, BlockedVector, blocks, mortar
2+
using BlockSparseArrays: BlockSparseArray, BlockDiagonal, eachblockstoredindex, svd
63
using DiagonalArrays: diagonal
74
using LinearAlgebra: LinearAlgebra
5+
using Random: Random
6+
using Test: @inferred, @testset, @test
87

9-
function test_svd(a, usv)
8+
function test_svd(a, usv; broken=false)
109
U, S, V = usv
11-
12-
@test U * diagonal(S) * V' a
10+
@test U * diagonal(S) * V' a broken = broken
1311
@test U' * U LinearAlgebra.I
1412
@test V' * V LinearAlgebra.I
1513
end
@@ -41,11 +39,17 @@ end
4139
@testset "($m, $n) BlockDiagonal{$T}" for ((m, n), T) in
4240
Iterators.product(blockszs, eltypes)
4341
a = BlockDiagonal([rand(T, i, j) for (i, j) in zip(m, n)])
44-
usv = svd(a)
45-
# TODO: `BlockDiagonal * Adjoint` errors
46-
# TODO: This is broken because of https://github.com/JuliaLang/julia/issues/57034,
47-
# fix and reenable.
48-
#test_svd(a, usv)
42+
if VERSION v"1.11"
43+
usv = svd(a)
44+
# TODO: `BlockDiagonal * Adjoint` errors
45+
# TODO: This is broken because of https://github.com/JuliaLang/julia/issues/57034,
46+
# fix and reenable.
47+
test_svd(a, usv; broken=true)
48+
else
49+
# `svd(a)` depends on `diagind(::AbstractMatrix, ::IndexStyle)`
50+
# being defined, but it was only introduced in Julia v1.11.
51+
@test svd(a) broken = true
52+
end
4953
end
5054

5155
# blocksparse

0 commit comments

Comments
 (0)