Skip to contents

This allows for post-hoc whitelisting of results according to the patterns specified.

Usage

whitelist(object, patterns)

Arguments

object

An object of class cbtf.

patterns

One or more strings containing regular expressions to match the errors to whitelist.

Value

An object of class cbtf with the additional whitelist patterns applied.

See also

Examples

## this reports a false positive result
(res <- fuzz(funs = "matrix", what = test_inputs("scalar")))
#>  Fuzzing 1 function on 7 inputs
#>  Functions will be searched in the global namespace as 'package' was not specified
#>   🚨   CAUGHT BY THE FUZZ!   🚨
#> 
#> ── Test input: NULL 
#>  matrix  FAIL  'data' must be of a vector type, was 'NULL'
#> 
#>  [ FAIL 1 | WARN 0 | SKIP 0 | OK 6 ] 

## with whitelisting, we can remove that
whitelist(res, "must be of a vector type")
#>   🏃 You didn't get caught by the fuzz!
#> 
#>  [ FAIL 0 | WARN 0 | SKIP 0 | OK 7 ]