tests/testthat/test-sorting.R

library("testthat")

context("test-sorting.R")

#
# Sort functions
#

test_that("Check sorting functions", {
    set.seed(123)
    vector <- c(1:100)

    expect_true(Cyclops:::.isSortedVectorList(vectorList = list(vector[1]), ascending = FALSE))
    expect_true(Cyclops:::.isSortedVectorList(vectorList = list(vector), ascending = c(TRUE)))
    expect_false(Cyclops:::.isSortedVectorList(vectorList = list(vector), ascending = c(FALSE)))
})

Try the Cyclops package in your browser

Any scripts or data that you put into this service are public.

Cyclops documentation built on Aug. 10, 2022, 5:08 p.m.