Skip to content

Commit 49d3f1c

Browse files
nsajkojakobnissen
authored andcommitted
test: update test_throws again
1 parent 383043e commit 49d3f1c

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

test/runtests.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,15 @@ end
397397
@test v1 == v2
398398
@test mem1 == mem2
399399

400-
@test_throws BoundsError copy!(MemoryView([1]), MemoryView([1, 2]))
401-
@test_throws BoundsError copy!(MemoryView([1, 2]), MemoryView([1]))
400+
@test_throws LightBoundsError copy!(MemoryView([1]), MemoryView([1, 2]))
401+
@test_throws LightBoundsError copy!(MemoryView([1, 2]), MemoryView([1]))
402402

403403
# Copyto!
404404
v1 = [4, 2, 6, 7, 9]
405405
v2 = [1, 5, 2, 3]
406406
copyto!(MemoryView(v1), MemoryView(v2))
407407
@test v1 == [1, 5, 2, 3, 9]
408-
@test_throws BoundsError copyto!(MemoryView(v2), MemoryView(v1))
408+
@test_throws LightBoundsError copyto!(MemoryView(v2), MemoryView(v1))
409409

410410
# unsafe_copyto!
411411
v1 = [3, 6, 2, 1]
@@ -527,17 +527,17 @@ end
527527
@test findnext(isodd, mem, 0x04) === nothing
528528
@test findnext(isodd, mem, 10) === nothing
529529

530-
@test_throws BoundsError findnext(isodd, mem, 0)
531-
@test_throws BoundsError findnext(isodd, mem, -1)
530+
@test_throws LightBoundsError findnext(isodd, mem, 0)
531+
@test_throws LightBoundsError findnext(isodd, mem, -1)
532532

533533
@test findprev(isodd, mem, 4) == 3
534534
@test findprev(isodd, mem, 0x03) == 3
535535
@test findprev(isodd, mem, 2) == 1
536536
@test findprev(isodd, mem, 0x00) === nothing
537537
@test findprev(isodd, mem, -10) === nothing
538538

539-
@test_throws BoundsError findprev(isodd, mem, 5)
540-
@test_throws BoundsError findprev(isodd, mem, 7)
539+
@test_throws LightBoundsError findprev(isodd, mem, 5)
540+
@test_throws LightBoundsError findprev(isodd, mem, 7)
541541
end
542542

543543
@testset "Memchr routines" begin
@@ -548,8 +548,8 @@ end
548548
@test findnext(==(T(2)), mem, 3) == 5
549549
@test findnext(==(T(7)), mem, 4) === nothing
550550
@test findnext(==(T(2)), mem, 7) === nothing
551-
@test_throws BoundsError findnext(iszero, mem, 0)
552-
@test_throws BoundsError findnext(iszero, mem, -3)
551+
@test_throws LightBoundsError findnext(iszero, mem, 0)
552+
@test_throws LightBoundsError findnext(iszero, mem, -3)
553553

554554
@test findlast(iszero, mem) == 4
555555
@test findprev(iszero, mem, 3) === nothing
@@ -559,7 +559,7 @@ end
559559
@test findprev(==(T(9)), mem, 3) === nothing
560560
@test findprev(==(T(2)), mem, -2) === nothing
561561
@test findprev(iszero, mem, 0) === nothing
562-
@test_throws BoundsError findprev(iszero, mem, 7)
562+
@test_throws LightBoundsError findprev(iszero, mem, 7)
563563
end
564564
mem = MemoryView(Int8[2, 3, -1])
565565
@test findfirst(==(0xff), mem) === nothing

0 commit comments

Comments
 (0)