Mercurial > repos > public > sbplib_julia
changeset 1422:949fe47d65a4 bugfix/grids/tensor_grid_length
Add tests for `length(::TensorGrid)`
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2023 16:27:12 +0200 |
parents | 69c9e6eae686 |
children | 48e16efaac7a |
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:27:12 2023 +0200 @@ -91,6 +91,12 @@ @test size(TensorGrid(g₁, g₄)) == (11,) @test size(TensorGrid(g₁, g₄, g₂)) == (11,6) + @test length(TensorGrid(g₁, g₂)) == 66 + @test length(TensorGrid(g₁, g₃)) == 110 + @test length(TensorGrid(g₁, g₂, g₃)) == 660 + @test length(TensorGrid(g₁, g₄)) == 11 + @test length(TensorGrid(g₁, g₄, g₂)) == 66 + @test Base.IteratorSize(TensorGrid(g₁, g₂)) == Base.HasShape{2}() @test Base.IteratorSize(TensorGrid(g₁, g₃)) == Base.HasShape{2}() @test Base.IteratorSize(TensorGrid(g₁, g₂, g₃)) == Base.HasShape{3}()