Learn R Programming

testthat (version 0.9.1)

fail: 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

Run this code
test_that("this test fails", fail())

Run the code above in your browser using DataLab