Skip to content

Commit 5111bb2

Browse files
committed
use isdual ins tests
1 parent c1ec06d commit 5111bb2

File tree

1 file changed

+4
-5
lines changed
  • NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test

1 file changed

+4
-5
lines changed

NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,16 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
140140
@test a[I] == a_dense[I]
141141
end
142142
@test axes(a') == dual.(reverse(axes(a)))
143-
# TODO: Define and use `isdual` here.
144-
@test typeof(axes(a', 1)) === typeof(dual(axes(a, 2)))
145-
@test typeof(axes(a', 2)) === typeof(dual(axes(a, 1)))
143+
144+
@test isdual(axes(a', 1)) isdual(axes(a, 2))
145+
@test isdual(axes(a', 2)) isdual(axes(a, 1))
146146
@test isnothing(show(devnull, MIME("text/plain"), a))
147147

148148
# Check preserving dual in tensor algebra.
149149
for b in (a + a, 2 * a, 3 * a - a)
150150
@test Array(b) 2 * Array(a)
151-
# TODO: Define and use `isdual` here.
152151
for dim in 1:ndims(a)
153-
@test typeof(axes(b, dim)) === typeof(axes(b, dim))
152+
@test isdual(axes(b, dim)) == isdual(axes(a, dim))
154153
end
155154
end
156155

0 commit comments

Comments
 (0)