tests/testthat/test-if_else-raw.R

test_that("if_else on raw", {
  x <- c(5L, 2L, 1L, 9L)
  y <- rev(x)
  expect_equal(if_else(1:4 > 2, as.raw(x), as.raw(y)),
               as.raw(if_else(1:4 > 2, x, y)))
})

Try the hutils package in your browser

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

hutils documentation built on April 13, 2022, 5:23 p.m.