context("chr_inverse")
test_that("special cases are correct", {
expect_equal(chr_inverse(NA), NA_character_)
expect_equal(chr_inverse(character()), character())
})
test_that("works as expected", {
expect_equal(chr_inverse("ABC"),"CBA")
expect_equal(chr_inverse(c("ABC","XYZ")),
c("CBA", "ZYX"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.