tests/testthat/test_110_expr_value.R

testthat::context("ExprValue class")

testthat::test_that("Conversion to string works fine", {
  testthat::expect_equal(ExprValue$new("")$toString(), "''")
  testthat::expect_equal(ExprValue$new('"')$toString(), "'\"'")
  testthat::expect_equal(ExprValue$new("'")$toString(), "''''")
  testthat::expect_equal(ExprValue$new("a")$toString(), "'a'")
  testthat::expect_equal(ExprValue$new(10L)$toString(), "10")
  testthat::expect_equal(ExprValue$new(10)$toString(), "10")
  testthat::expect_equal(ExprValue$new(1.2)$toString(), "1.2")
})

Try the sqlq package in your browser

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

sqlq documentation built on Sept. 16, 2025, 9:10 a.m.