From fa20de106f75af0c651adb03b340eab91db5d5a7 Mon Sep 17 00:00:00 2001 From: Philippine Louail Date: Tue, 19 Mar 2024 11:24:37 +0100 Subject: [PATCH] Update test_force_sorted.R --- tests/testthat/test_force_sorted.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test_force_sorted.R b/tests/testthat/test_force_sorted.R index 714ef0e..676fea1 100644 --- a/tests/testthat/test_force_sorted.R +++ b/tests/testthat/test_force_sorted.R @@ -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)