Skip to content

Commit

Permalink
Update test_force_sorted.R
Browse files Browse the repository at this point in the history
  • Loading branch information
philouail committed Mar 19, 2024
1 parent 776f064 commit fa20de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test_force_sorted.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test_that("forceSorting works", {

# Test with decreasing values at the end
vec <- c(NA, NA, NA, 1.2, 1.1, 1.14, 1.2, 1.3, 1.4, 1.04, 1.2, 1.04, NA)
expect_warning(result <- force_sorted(vec), "replacing")
expect_warning(result <- force_sorted(vec, by = 0.000001), "replacing")
sorted <- c(NA, NA, NA, 1.2, 1.225, 1.25, 1.275, 1.3, 1.4, 1.400001,
1.400002, 1.400003, NA)
expect_equal(result, sorted)
Expand Down

0 comments on commit fa20de1

Please sign in to comment.