util: Utility functions

Description Usage Arguments

Description

Utility functions

Utility for testing how a function deals with missing required arguments. It calls the function length(args) times, each time omitting one argument

Usage

1
missing_argument_test(fun, args, outcomes)

Arguments

fun

Function to test

args

Complete list of required arguments to fun

outcomes

List of length args with expected outcomes for each test. Names should match those of args. Values should be either "FAIL", if the test is expected to throw an error, or anything else if it is expected to pass.


crtests documentation built on May 1, 2019, 9:09 p.m.