Skip to content

Commit 65e93c9

Browse files
committed
test: Julia 1.9 compat
Julia 1.9 (#43852) introduces CanonicalIndexError
1 parent ff7afc0 commit 65e93c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/views.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ end
7070
@test V[1,:,:] == A
7171
@test all(iszero, V[2,:,:])
7272
@test V[3,:,:] == B
73-
@test_throws ErrorException V[2,1,1] = 7
73+
err = VERSION >= v"1.6.0-DEV.1083" ? CanonicalIndexError : ErrorException
74+
@test_throws err V[2,1,1] = 7
7475
V32 = @inferred(StackedView{Float32}(A, zeroarray, B))
7576
@test eltype(V32) == Float32
7677
@test V32[1,1,2] == Float32(3)
@@ -106,7 +107,8 @@ end
106107
@test @inferred(v[1,2]) === GrayA{N0f8}(0.25, 0.25)
107108
v = @inferred(colorview(GrayA{N0f8}, a, zeroarray))
108109
@test @inferred(v[2,1]) === GrayA{N0f8}(0.3,0)
109-
@test_throws ErrorException (v[1,2] = GrayA(0.25, 0.25))
110+
err = VERSION >= v"1.6.0-DEV.1083" ? CanonicalIndexError : ErrorException
111+
@test_throws err (v[1,2] = GrayA(0.25, 0.25))
110112
# RGB
111113
v = @inferred(colorview(RGB{N0f8}, a, zeroarray, b))
112114
@test @inferred(v[2,1]) === RGB{N0f8}(0.3,0,0.7)

0 commit comments

Comments
 (0)