File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ legacy_types = Dict(ASCIIStr => to_ascii,
2121 UTF16Str => utf16,
2222 UTF32Str => utf32)
2323
24+ const errtype =
25+ @static isdefined (Base, :CanonicalIndexError ) ? Base. CanonicalIndexError : ErrorException
26+
2427# # create type specific test strings
2528test_strings_base = Dict ()
2629for T in AllCharTypes
872875 @test u[1 ] == 0xe2
873876 @test u[2 ] == 0x88
874877 @test u[8 ] == 0x79
875- @test_throws ErrorException (u[1 ] = 0x00 )
878+ @test_throws errtype (u[1 ] = 0x00 )
876879 @test collect (u) == b " ∀x∃y"
877880 end
878881
Original file line number Diff line number Diff line change 314314 b = testb ()
315315 @test eltype (b) === UInt8
316316 @test b isa AbstractVector
317- @test_throws ErrorException b[4 ] = ' 4'
317+ @test_throws errtype ( b[4 ] = ' 4' )
318318 @test testb () == UInt8[' 0' ,' 1' ,' 2' ,' 3' ]
319319 end
320320end
You can’t perform that action at this time.
0 commit comments