Mercurial > repos > public > sbplib_julia
comparison LazyTensors/test/runtests.jl @ 203:19e579a5031f boundary_conditions
Add (/) operation for LazyArrays and enable corresponding broken tests.
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Mon, 24 Jun 2019 10:51:39 +0200 |
| parents | 6b7019f2cd41 |
| children | 70e1f3401d82 |
comparison
equal
deleted
inserted
replaced
| 202:9e737d19fcfe | 203:19e579a5031f |
|---|---|
| 96 @test isa(v2 + v1, LazyArray) | 96 @test isa(v2 + v1, LazyArray) |
| 97 @test isa(v1 - v2, LazyArray) | 97 @test isa(v1 - v2, LazyArray) |
| 98 @test isa(v2 - v1, LazyArray) | 98 @test isa(v2 - v1, LazyArray) |
| 99 @test isa(v1 * v2, LazyArray) | 99 @test isa(v1 * v2, LazyArray) |
| 100 @test isa(v2 * v1, LazyArray) | 100 @test isa(v2 * v1, LazyArray) |
| 101 @test_broken isa(v1 / v2, LazyArray) | 101 @test isa(v1 / v2, LazyArray) |
| 102 @test_broken isa(v2 / v1, LazyArray) | 102 @test isa(v2 / v1, LazyArray) |
| 103 for i ∈ eachindex(v2) | 103 for i ∈ eachindex(v2) |
| 104 @test (v1 + v2)[i] == (v2 + v1)[i] == r_add[i] | 104 @test (v1 + v2)[i] == (v2 + v1)[i] == r_add[i] |
| 105 @test (v1 - v2)[i] == -(v2 - v1)[i] == r_sub[i] | 105 @test (v1 - v2)[i] == -(v2 - v1)[i] == r_sub[i] |
| 106 @test (v1 * v2)[i] == (v2 * v1)[i] == r_times[i] | 106 @test (v1 * v2)[i] == (v2 * v1)[i] == r_times[i] |
| 107 @test_broken (v1 / v2)[i] == 1/((v2 / v1)[i]) == r_div[i] | 107 @test (v1 / v2)[i] == 1/((v2 / v1)[i]) == r_div[i] |
| 108 end | 108 end |
| 109 @test_throws BoundsError (v1 + v2)[4] | 109 @test_throws BoundsError (v1 + v2)[4] |
| 110 v2 = [1., 2, 3, 4] | 110 v2 = [1., 2, 3, 4] |
| 111 # Test that size of arrays is asserted when not specified inbounds | 111 # Test that size of arrays is asserted when not specified inbounds |
| 112 @test_throws AssertionError v1 + v2 | 112 @test_throws AssertionError v1 + v2 |
