expect_that_combine_all_args: alternative 'expect_that' from 'testthat' which permutes all...

Description Usage Arguments Value Examples

View source: R/testing.r

Description

This makes a lot of assumptions, needs more testing. It can't handle mixed error/no error outcomes after permutation, which is an important feature to consider. The command following this function attaches this function to the testthat namespace. This means that it can call internal testthat functions, but does not mean it appears as testthat::expect_that_combine

Usage

1
2
3
4
5

Arguments

object

See expect_that.

condition

See expect_that.

info

See expect_that.

label

See expect_that.

Value

testthat result

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
expect_that_combine_all_args(
  sum(1, 2, 3),
  testthat::equals(6)
)
## Not run: 
expect_that_combine_all_args(stop("a", "b"), testthat::throws_error())
expect_that_combine_all_args(sum(1, 2), testthat::equals(3))
expect_that_combine_first_arg(sum(c(1, 2)), testthat::equals(3))

## End(Not run)

jackwasey/jwutil documentation built on Jan. 20, 2020, 6:56 p.m.