Skip to content

Commit

Permalink
Fix one more NA/NaN test (#237)
Browse files Browse the repository at this point in the history
* fix one more na/nan

* NEWS

* maybe fix gcc 4.8
  • Loading branch information
paleolimbot authored May 6, 2023
1 parent 7ba4f0e commit 7dbf4d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# s2 (development version)

* Updated more tests to pass on a forthcoming waldo package update (#237).

# s2 1.1.3

* Made a test less strict to pass tests on Alpine Linux (#218, #220).
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-s2-accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ test_that("s2_project() and s2_project_normalized() work", {
"LINESTRING (0 0, 0 90)",
c("POINT (0 0)", "POINT (0 22.5)", "POINT (0 67.5)", "POINT (0 90)", "POINT EMPTY", NA)
),
c(0, 0.25, 0.75, 1, NA_real_, NA_real_)
c(0, 0.25, 0.75, 1, NaN, NA_real_)
)

expect_identical(
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-s2-lnglat.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ test_that("s2_lnglat objects can be created from and converted back to R objects
as_s2_lnglat(s2_point(1, 0, 0)),
s2_lnglat(0, 0)
)

expect_identical(
as_s2_lnglat(s2_point(NA, NA, NA)),
s2_lnglat(NA, NA)
as_s2_lnglat(s2_point(NaN, NaN, NaN)),
s2_lnglat(NaN, NaN)
)
})

Expand Down

0 comments on commit 7dbf4d2

Please sign in to comment.