fail {testthat}R Documentation

A default expectation that always fails.

Description

The fail function forces a test to fail. This is useful if you want to test a pre-condition '

Usage

fail(message = "Failure has been forced")

Arguments

message

a string to display.

Examples

## Not run: 
test_that("this test fails", fail())

## End(Not run)

[Package testthat version 0.11.0 Index]