tests/testthat/test_utils_for_plots.R

context("tex_conv borderline cases")

test_that(
  "tex_conv() borderline cases"
  , {
    object_1 <- expression(test)
    object_2 <- tex_conv(object_1)
    object_3 <- "a"
    object_4 <- tex_conv(object_3, latex2exp = FALSE)

    expect_identical(
      object = object_2
      , expected = object_1[[1]]
    )
    expect_identical(
      object = object_4
      , expected = as.expression(object_3)[[1]]
    )
  }
)

Try the papaja package in your browser

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

papaja documentation built on Oct. 30, 2024, 9:09 a.m.