Mercurial > repos > public > sbplib_julia
diff LazyTensors/test/runtests.jl @ 207:f85a0b38f3ff boundary_conditions
Change error type when doing element wise operations on lazy arrays of missmatching dimension
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 24 Jun 2019 15:54:47 +0200 |
parents | 7b0650021b36 |
children | 992969237359 |
line wrap: on
line diff
--- a/LazyTensors/test/runtests.jl Mon Jun 24 14:57:17 2019 +0200 +++ b/LazyTensors/test/runtests.jl Mon Jun 24 15:54:47 2019 +0200 @@ -84,7 +84,7 @@ @test_throws BoundsError (v1 +̃ v2)[4] v2 = [1., 2, 3, 4] # Test that size of arrays is asserted when not specified inbounds - @test_throws AssertionError v1 +̃ v2 + @test_throws DimensionMismatch v1 +̃ v2 # Test that no error checking is performed when specified inbounds res = (v1,v2) -> (@inbounds (v1 +̃ v2)[1] == 2) @test res(v1,v2) @@ -103,7 +103,7 @@ @test_throws BoundsError (v1 + v2)[4] v2 = [1., 2, 3, 4] # Test that size of arrays is asserted when not specified inbounds - @test_throws AssertionError v1 + v2 + @test_throws DimensionMismatch v1 + v2 # Test that no error checking is performed when specified inbounds res = (v1,v2) -> (@inbounds (v1 + v2)[1] == 2) @test res(v1,v2)