Skip to content

Commit ff1acb3

Browse files
authored
"fix" nightly test (#102)
1 parent 565a8f2 commit ff1acb3

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

test/runtests.jl

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,22 @@ end
453453

454454
b = 1:2 # copy between AbstractArrays
455455
bo = OffsetArray(1:2, (-3,))
456-
@test_throws BoundsError copyto!(a, b)
457-
fill!(a, -1)
458-
copyto!(a, bo)
459-
@test a[-3] == -1
460-
@test a[-2] == 1
461-
@test a[-1] == 2
456+
if VERSION < v"1.5-"
457+
@test_throws BoundsError copyto!(a, b)
458+
fill!(a, -1)
459+
copyto!(a, bo)
460+
@test a[-3] == -1
461+
@test a[-2] == 1
462+
@test a[-1] == 2
463+
else
464+
# the behavior of copyto! is corrected as the documentation says "first n element"
465+
# https://github.com/JuliaLang/julia/pull/34049
466+
fill!(a, -1)
467+
copyto!(a, bo)
468+
@test a[-3] == 1
469+
@test a[-2] == 2
470+
@test a[-1] == -1
471+
end
462472
fill!(a, -1)
463473
copyto!(a, -2, bo)
464474
@test a[-3] == -1

0 commit comments

Comments
 (0)