tests/testthat/test-first_to_lower.R

test_that("only first of several uppercase letters is lowercased", {
  expect_equal(first_to_lower("Hi There"), "hi There")
})

test_that("only first uppercase letters is lowercased", {
  expect_equal(first_to_lower("Hi there"), "hi there")
})

test_that("a string begining with a numerla is handled okay", {
  expect_equal(first_to_lower("1way to know"), "1way to know")
})

test_that("integers are converted to strings", {
  expect_equal(first_to_lower(56L), "56")
})

test_that("doubles are converted to strings", {
  expect_equal(first_to_lower(exp(1)), "2.71828182845905")
})
Kidapt/keda documentation built on Nov. 23, 2019, 3:35 a.m.