inst/tinytest/test_utilities.R

# NULL OR operator =============================================================
expect_equal(`%||%`(NULL, 1), 1)
expect_equal(`%||%`(0, 1), 0)

# Concatenates =================================================================
expect_equal(`%+%`("foo", "bar"), "foobar")
expect_equal(`%+%`(character(), "bar"), character())
expect_equal(`%+%`("foo", character()), character())
expect_equal(`%+%`(character(), character()), character())

Try the arkhe package in your browser

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

arkhe documentation built on April 4, 2025, 2:34 a.m.