Skip to content

Commit e155ef6

Browse files
committed
Rewrite unit_space test for floating point
This test was failing with ``` /home/runner/work/ClimaCore.jl/ClimaCore.jl/test/Spaces/unit_spaces.jl:58 Expression: coord_slab[slab_index(4)] == Geometry.XPoint{FT}(5) Evaluated: XPoint(4.999999999999999) == XPoint(5.0) ```
1 parent acc1747 commit e155ef6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/Spaces/unit_spaces.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ on_gpu = ClimaComms.device() isa ClimaComms.CUDADevice
5555
@test DataLayouts.farray_size(Spaces.coordinates_data(space)) == (4, 1, 1)
5656
coord_slab = slab(Spaces.coordinates_data(space), 1)
5757
@test coord_slab[slab_index(1)] == Geometry.XPoint{FT}(-3)
58-
@test coord_slab[slab_index(4)] == Geometry.XPoint{FT}(5)
58+
@test typeof(coord_slab[slab_index(4)]) == Geometry.XPoint{FT}
59+
@test coord_slab[slab_index(4)].x FT(5)
5960

6061
local_geometry_slab = slab(Spaces.local_geometry_data(space), 1)
6162
dss_weights_slab = slab(space.grid.dss_weights, 1)

0 commit comments

Comments
 (0)