tests/testsuite/test_sort.R

Renv <- new.env(parent = globalenv())
Renv$x <- swiss$Education[1:25]
Renv$x1 <- round(rnorm(10,sd=100))
Renv$x2 <- c(10:3, 2:12)
FLenv <- as.FL(Renv)

test_that("sort:",{
          eval_expect_equal({
              test1 <- sort(x)
              test2 <- sort(x1)
          },Renv,FLenv)
})


test_that("sort: method=shell",
          eval_expect_equal({
              tshell <- sort(x2, method = "shell", index.return = TRUE)
          },Renv,FLenv,
          expectation = c("tshell")))
Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.