Expect that the tested function is self-contained

Share:

Description

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

Usage

1
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.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.