Learn R Programming

markmyassignment (version 0.3.0)

expect_function_code: Expect function contain code

Description

Test that a given code code exists in function

Usage

expect_function_code(object, expected, info = NULL, label = NULL,
  expected.label = NULL)

Arguments

object
Function to check the body
expected
Expected arguments in function.
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.
expected.label
Equivalent of label for shortcut form.