Mercurial > repos > public > sbplib_julia
comparison test/Grids/grid_test.jl @ 1272:3637daad71e8 refactor/grids
Add function target_manifold_dim for Grid
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Sat, 25 Feb 2023 22:49:43 +0100 |
| parents | dcbac783e4c1 |
| children | 7fab13c07412 |
comparison
equal
deleted
inserted
replaced
| 1271:5977d7628d55 | 1272:3637daad71e8 |
|---|---|
| 9 @test eltype(DummyGrid{Int, 2}) == Int | 9 @test eltype(DummyGrid{Int, 2}) == Int |
| 10 @test eltype(DummyGrid{Int, 2}()) == Int | 10 @test eltype(DummyGrid{Int, 2}()) == Int |
| 11 | 11 |
| 12 @test ndims(DummyGrid{Int, 2}()) == 2 | 12 @test ndims(DummyGrid{Int, 2}()) == 2 |
| 13 @test dims(DummyGrid{Int, 2}()) == 1:2 | 13 @test dims(DummyGrid{Int, 2}()) == 1:2 |
| 14 | |
| 15 @test target_manifold_dim(DummyGrid{Int, 1}()) == 1 | |
| 16 @test target_manifold_dim(DummyGrid{SVector{3,Float64}, 2}()) == 3 | |
| 14 end | 17 end |
| 15 | 18 |
| 16 @testset "eval_on" begin | 19 @testset "eval_on" begin |
| 17 @test eval_on(ZeroDimGrid(@SVector[1.,2.]), x̄->x̄[1]+x̄[2]) isa LazyArray | 20 @test eval_on(ZeroDimGrid(@SVector[1.,2.]), x̄->x̄[1]+x̄[2]) isa LazyArray |
| 18 @test eval_on(ZeroDimGrid(@SVector[1.,2.]), x̄->x̄[1]+x̄[2]) == fill(3.) | 21 @test eval_on(ZeroDimGrid(@SVector[1.,2.]), x̄->x̄[1]+x̄[2]) == fill(3.) |
