Learn R Programming

markmyassignment (version 0.6.0)

expect_function_self_contained: Expect that the tested function is self-contained

Description

Tests if a fuction is self-contained (i.e. do not use any global variables).

Usage

expect_function_self_contained(object, info = NULL, label = NULL)

Arguments

object
Function to test if it is self-contained.
info
Extra information to be included in the message (useful when writing tests in loops).
label
For full form, label of expected object used in error messages. Useful to override default (deparsed expected expression) when doing tests in a loop. For short cut form, object label. When NULL, computed from deparsed object.