comparison test/Grids/tensor_grid_test.jl @ 1410:c7c5bc2a1ce2 bugfix/grids/complete_interface_impl

Add axes test
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 22 Aug 2023 22:21:48 +0200
parents a7afba63adb5
children faffc5957bf2
comparison
equal deleted inserted replaced
1400:a7afba63adb5 1410:c7c5bc2a1ce2
37 37
38 g = TensorGrid(g₁, g₂) 38 g = TensorGrid(g₁, g₂)
39 @test g[begin, begin] == g[1,1] 39 @test g[begin, begin] == g[1,1]
40 @test g[begin, end] == g[1,6] 40 @test g[begin, end] == g[1,6]
41 @test g[end, end] == g[11,6] 41 @test g[end, end] == g[11,6]
42
43 @test axes(g, 1) == 1:11
44 @test axes(g, 2) == 1:6
45 @test axes(g) == (1:11,1:6)
42 end 46 end
43 47
44 @testset "cartesian indexing" begin 48 @testset "cartesian indexing" begin
45 cases = [ 49 cases = [
46 (TensorGrid(g₁, g₂), (1,1) ), 50 (TensorGrid(g₁, g₂), (1,1) ),