local_testthat {fmesher}R Documentation

Unit test helpers

Description

Local helper functions for package unit tests

Usage

local_fm_testthat_assign(x, values, envir = parent.frame())

local_fm_testthat_tolerances(
  tolerances = c(1e-04, 0.01, 0.1),
  envir = parent.frame()
)

local_fm_testthat_setup(envir = parent.frame())

Arguments

x

character; Name of variable to assign to

values

the object to assign to x

envir

environment for exit handlers

tolerances

numeric vector of length 3; ⁠[lowtol, midtol, hitol]⁠

Value

None

Functions

Examples

outer_fun <- function() {
  fun <- function(envir = parent.frame()) {
    local_fm_testthat_assign("local_var_name", 1:4, envir = envir)
  }
  fun()
  local_var_name
}
exists("local_var_name")
outer_fun()
exists("local_var_name")


[Package fmesher version 0.5.0 Index]