From d02cf2ac7a7bf04a847f806e0f6399a190c75b1f Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Tue, 23 Apr 2024 14:47:13 +0200 Subject: [PATCH] test for negative-length `copyto!` call Discovered by #29 --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index a0a5c3f..5ed7073 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -193,6 +193,7 @@ end @test copyto!(d, s) == 1:5 @test copyto!(d, 1, s, 1, length(s)) isa D{Float64} @test copyto!(d, 1, s, 1, length(s)) == 1:5 + @test_throws ArgumentError copyto!(d, 1, s, 1, -1) end end end