tests/testthat/test-nlogotest-misc-utils.R

test_that("convert_lgl_to_lwrcs_char converts logic to char, and leaves,
          char and numeric unchanged.", {
  x <- c(TRUE,FALSE,TRUE)
  y <- c(1,2,3,4)
  z <- c("a", "b", "c")
  y_e <- y
  x_e <- c("true", "false", "true")
  z_e <- z

  expect_identical(convert_lgl_to_lwrcs_char(x), x_e)
  expect_identical(convert_lgl_to_lwrcs_char(y), y_e)
  expect_identical(convert_lgl_to_lwrcs_char(z), z_e)
 })
ltdroy/nlogotest documentation built on June 4, 2020, 6:17 a.m.