Mercurial > repos > public > sbplib_julia
comparison test/Grids/grid_test.jl @ 1516:8d64f8981bb0 feature/grids/componentview
Remove comments and add todo
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Thu, 21 Mar 2024 07:42:19 +0100 |
| parents | b2eaa1ad19c8 |
| children | 7ee7df7d9b61 |
comparison
equal
deleted
inserted
replaced
| 1515:b2eaa1ad19c8 | 1516:8d64f8981bb0 |
|---|---|
| 92 | 92 |
| 93 @testset "components" begin | 93 @testset "components" begin |
| 94 # REVIEW: I think we can reduce the index ranges. | 94 # REVIEW: I think we can reduce the index ranges. |
| 95 v = [@SMatrix[1 3; 2 4] .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] | 95 v = [@SMatrix[1 3; 2 4] .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] |
| 96 | 96 |
| 97 # switch to indexing in test? | |
| 98 @test ArrayComponentView(v, (1, 1)) == [1 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] | 97 @test ArrayComponentView(v, (1, 1)) == [1 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] |
| 99 @test ArrayComponentView(v, (1, 2)) == [3 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] | 98 @test ArrayComponentView(v, (1, 2)) == [3 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] |
| 100 @test ArrayComponentView(v, (2, 1)) == [2 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] | 99 @test ArrayComponentView(v, (2, 1)) == [2 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] |
| 101 | 100 |
| 102 @test ArrayComponentView(v, (1, :)) == [@SVector[1,3] .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] | 101 @test ArrayComponentView(v, (1, :)) == [@SVector[1,3] .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] |
