We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8d0726 commit deac863Copy full SHA for deac863
tests/testthat/test-limits.R
@@ -0,0 +1,15 @@
1
+test_that("limits_include gives expected results", {
2
+ x <- limits_include(2)(c(-5, -1))
3
+ expect_equal(x, c(-5, 2))
4
+
5
+ x <- limits_include(-2)(c(5, 1))
6
+ expect_equal(x, c(-2, 5))
7
+})
8
9
+test_that("limits_center gives expected results", {
10
+ x <- limits_center(-1)(c(0, 1))
11
+ expect_equal(x, c(-3, 1))
12
13
+ x <- limits_center(1)(c(0, 1))
14
+ expect_equal(x, c(0, 2))
15
0 commit comments