Mercurial > repos > public > sbplib_julia
comparison test/Grids/equidistant_grid_test.jl @ 1255:1989d432731a refactor/grids
Implement the interfaces for iteration and indexing on EquidistantGrid. Make collect() work
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 22 Feb 2023 22:38:25 +0100 |
| parents | ff8f335c32d1 |
| children | ee57bdb366e4 |
comparison
equal
deleted
inserted
replaced
| 1254:f98d8ede0e90 | 1255:1989d432731a |
|---|---|
| 28 @test inverse_spacing(EquidistantGrid(0:0.1:10)) == 10 | 28 @test inverse_spacing(EquidistantGrid(0:0.1:10)) == 10 |
| 29 end | 29 end |
| 30 | 30 |
| 31 @testset "collect" begin | 31 @testset "collect" begin |
| 32 g = EquidistantGrid(0:0.1:0.5) | 32 g = EquidistantGrid(0:0.1:0.5) |
| 33 @test_broken collect(g) == [0.0, 0.1, 0.2, 0.3, 0.4, 0.5] | 33 @test collect(g) == [0.0, 0.1, 0.2, 0.3, 0.4, 0.5] |
| 34 end | 34 end |
| 35 | 35 |
| 36 @testset "getindex" begin | 36 @testset "getindex" begin |
| 37 g = EquidistantGrid(0:0.1:10) | 37 g = EquidistantGrid(0:0.1:10) |
| 38 @test g[1] == 0.0 | 38 @test g[1] == 0.0 |
