diff test/Grids/tensor_grid_test.jl @ 1387:3d6425c36d32 bugfix/grids/complete_interface_impl

Start adding tests for `firstindex` and `lastindex` on `TensorGrid`
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 15 Aug 2023 21:20:29 +0200
parents 42ecd4b3e215
children c0208286234e
line wrap: on
line diff
--- a/test/Grids/tensor_grid_test.jl	Thu Jun 08 15:52:22 2023 +0200
+++ b/test/Grids/tensor_grid_test.jl	Tue Aug 15 21:20:29 2023 +0200
@@ -59,6 +59,18 @@
             @test eachindex(TensorGrid(g₁, g₄)) == CartesianIndices((11,))
             @test eachindex(TensorGrid(g₁, g₄, g₂)) == CartesianIndices((11,6))
         end
+
+        @testset "firstindex" begin
+            @test_broken firstindex(TensorGrid(g₁, g₂, g₃), 1) == 1
+            @test_broken firstindex(TensorGrid(g₁, g₂, g₃), 2) == 1
+            @test_broken firstindex(TensorGrid(g₁, g₂, g₃), 3) == 1
+        end
+
+        @testset "lastindex" begin
+            @test_broken lastindex(TensorGrid(g₁, g₂, g₃), 1) == 11
+            @test_broken lastindex(TensorGrid(g₁, g₂, g₃), 2) == 6
+            @test_broken lastindex(TensorGrid(g₁, g₂, g₃), 3) == 10
+        end
     end
 
     @testset "Iterator interface" begin