EVOLUTION-MANAGER
Edit File: fail.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Default expectations that always succeed or fail.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for fail {testthat}"><tr><td>fail {testthat}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Default expectations that always succeed or fail.</h2> <h3>Description</h3> <p>These allow you to manually trigger success or failure. Failure is particularly useful to a pre-condition or mark a test as not yet implemented. </p> <h3>Usage</h3> <pre> fail( message = "Failure has been forced", info = NULL, trace_env = caller_env() ) succeed(message = "Success has been forced", info = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>message</code></td> <td> <p>a string to display.</p> </td></tr> <tr valign="top"><td><code>info</code></td> <td> <p>Character vector continuing additional information. Included for backward compatibility only and new expectations should not use it.</p> </td></tr> <tr valign="top"><td><code>trace_env</code></td> <td> <p>If <code>is.null(trace)</code>, this is used to automatically generate a traceback running from <code>test_code()</code>/<code>test_file()</code> to <code>trace_env</code>. You'll generally only need to set this if you're wrapping an expectation inside another function.</p> </td></tr> </table> <h3>Examples</h3> <pre> ## Not run: test_that("this test fails", fail()) test_that("this test succeeds", succeed()) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>testthat</em> version 3.1.5 <a href="00Index.html">Index</a>]</div> </body></html>