Mercurial > repos > public > sbplib_julia
changeset 1424:f11615573e4d refactor/grids/tensor_grid_eltype
Add tests for `eltype(::Type{<:TensorGrid})`
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2023 16:38:17 +0200 |
parents | 69c9e6eae686 |
children | 25af92b4a7ea |
files | test/Grids/tensor_grid_test.jl |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/Grids/tensor_grid_test.jl Fri Aug 25 08:49:07 2023 +0200 +++ b/test/Grids/tensor_grid_test.jl Thu Sep 07 16:38:17 2023 +0200 @@ -85,6 +85,12 @@ @test eltype(TensorGrid(g₁, g₄)) == SVector{3,Float64} @test eltype(TensorGrid(g₁, g₄, g₂)) == SVector{4,Float64} + @test eltype(typeof(TensorGrid(g₁, g₂))) == SVector{2,Float64} + @test eltype(typeof(TensorGrid(g₁, g₃))) == SVector{2,Float64} + @test eltype(typeof(TensorGrid(g₁, g₂, g₃))) == SVector{3,Float64} + @test eltype(typeof(TensorGrid(g₁, g₄))) == SVector{3,Float64} + @test eltype(typeof(TensorGrid(g₁, g₄, g₂))) == SVector{4,Float64} + @test size(TensorGrid(g₁, g₂)) == (11,6) @test size(TensorGrid(g₁, g₃)) == (11,10) @test size(TensorGrid(g₁, g₂, g₃)) == (11,6,10)