tests/testthat/test-1-4-0-swap.R

context("test-1-4-0-swap")

test_that("swap works", {
  a <- 1
  b <- 2
  a %<->% b
  expect_equal(a, 2)
  expect_equal(b, 1)
})

test_that("swap errors", {
  "***temp***" <- NULL
  a <- list()
  b <- c()
  expect_error(a %<->% b)  # don't worry about error message for now
})
HughParsonage/hutils documentation built on Feb. 12, 2023, 8:26 a.m.