Avoid rounding errors from pretty(). Fixes #1006

This commit is contained in:
Winston Chang
2018-02-26 16:00:15 -06:00
parent 8e0f17c9d7
commit fe3f351a2d
3 changed files with 31 additions and 14 deletions

View File

@@ -14,3 +14,10 @@ test_that("selectInput options are properly escaped", {
expect_true(any(grepl("<option value=\"&#39;\">", si_str, fixed = TRUE)))
expect_true(any(grepl("<optgroup label=\"&quot;Separators&quot;\">", si_str, fixed = TRUE)))
})
# For issue #1006
test_that("sliderInput steps don't have rounding errors", {
# Need to use expect_identical; expect_equal is too forgiving of rounding error
expect_identical(findStepSize(-5.5, 4, NULL), 0.1)
})