quickcheck: Quickcheck a function.

Description Usage Arguments Details Value

View source: R/quickcheck.R

Description

Tests a function with many automatically generated inputs, checking that stated postconditions hold.

Usage

1
2
quickcheck(fn, postconditions = NULL, verbose = TRUE, testthat = TRUE,
  frame = NULL)

Arguments

fn

function. A function to randomly check postconditions for.

postconditions

list. Optional postconditions to quickcheck for.

verbose

logical. Whether or not to announce the success.

testthat

logical. Whether or not to run testthat.

frame

list. A custom testing_frame to use, if necessary.

Details

If given a function of class validated_function, the pre- and post-conditions can be automatically inferred by the definition of the function. The test objects used to test the function will be screened ahead of time to ensure they meet the preconditions.

Value

either TRUE if the function passed the quickcheck or FALSE if it didn't.


peterhurford/quickcheckr documentation built on May 25, 2019, 1:50 a.m.