tests/testthat/test-f_ordinal.R

context("Checking f_ordinal")

test_that("f_ordinal adds correct suffixes",{

    expect_equivalent(f_ordinal(1:10),
        c("1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th")
    )
})


test_that("f_ordinal throws warning below zero",{

    expect_warning(f_ordinal(0))
})

Try the numform package in your browser

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

numform documentation built on Oct. 10, 2021, 1:10 a.m.