diff --git a/test/test_check_size.jl b/test/test_check_size.jl index 9ef7dbc1..fec27bc5 100644 --- a/test/test_check_size.jl +++ b/test/test_check_size.jl @@ -33,7 +33,7 @@ ds["w"][:,1:15] = ones(10,15) @test size(ds["w"]) == (10,15) # w cannot grow along a fixed dimension -@test_throws DimensionMismatch ds["w"][:,:] = ones(11,15) +@test_throws Union{NCDatasets.NetCDFError,DimensionMismatch} ds["w"][:, :] = ones(11, 15) # NetCDF: Index exceeds dimension bound @test_throws Union{NCDatasets.NetCDFError,BoundsError} ds["u"][100,100] diff --git a/test/test_variable.jl b/test/test_variable.jl index ad016860..7b07ceab 100644 --- a/test/test_variable.jl +++ b/test/test_variable.jl @@ -20,7 +20,7 @@ NCDataset(filename,"c") do ds v = defVar(ds,"small",Float64,("lon","lat")) # @test_throws Union{NCDatasets.NetCDFError,DimensionMismatch} v[:] = zeros(sz[1]+1,sz[2]) - @test_throws DimensionMismatch v[1:sz[1],1:sz[2]] = zeros(sz[1]+1,sz[2]) + @test_throws Union{NCDatasets.NetCDFError,DimensionMismatch} v[1:sz[1],1:sz[2]] = zeros(sz[1]+1,sz[2]) @test_throws NCDatasets.NetCDFError v[sz[1]+1,1] = 1 @test_throws NCDatasets.NetCDFError v[-1,1] = 1