Mercurial > repos > public > sbplib_julia
comparison test/Grids/equidistant_grid_test.jl @ 1412:e56277744ebb bugfix/grids/complete_interface_impl
Add more tests to indexing
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 22 Aug 2023 22:39:03 +0200 |
parents | 447833be2ecc |
children | 410bc321242c |
comparison
equal
deleted
inserted
replaced
1411:faffc5957bf2 | 1412:e56277744ebb |
---|---|
20 | 20 |
21 @test all(eachindex(g) .== 1:101) | 21 @test all(eachindex(g) .== 1:101) |
22 | 22 |
23 @test firstindex(g) == 1 | 23 @test firstindex(g) == 1 |
24 @test lastindex(g) == 101 | 24 @test lastindex(g) == 101 |
25 | |
26 @test g[:] == g[1:101] | |
27 | |
28 @test axes(g,1) == 1:101 | |
29 @test axes(g) == (1:101,) | |
25 end | 30 end |
26 | 31 |
27 @testset "Iterator interface" begin | 32 @testset "Iterator interface" begin |
28 @test eltype(EquidistantGrid(0:10)) == Int | 33 @test eltype(EquidistantGrid(0:10)) == Int |
29 @test eltype(EquidistantGrid(0:2:10)) == Int | 34 @test eltype(EquidistantGrid(0:2:10)) == Int |