Verified Commit 5d7b8f98 authored by Camil Staps's avatar Camil Staps 🚀

Add CustomFailReason

This gives some more freedom to test frameworks.
parent 8ed11ff0
Pipeline #29237 passed with stage
in 2 minutes and 53 seconds
...@@ -58,10 +58,11 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode, :: ...@@ -58,10 +58,11 @@ from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode, ::
* Reasons for failing a test. * Reasons for failing a test.
*/ */
:: FailReason :: FailReason
= FailedAssertions [FailedAssertion] //* Assertions that caused the test to fail = FailedAssertions ![FailedAssertion] //* Assertions that caused the test to fail
| CounterExamples [CounterExample] //* Example values for which the test failed | CounterExamples ![CounterExample] //* Example values for which the test failed
| FailedChildren [(String, Maybe FailReason)] //* Subtests failed; the tuples are of name and failing reason | FailedChildren ![(String, Maybe FailReason)] //* Subtests failed; the tuples are of name and failing reason
| Crashed //* The test crashed | Crashed //* The test crashed
| CustomFailReason !String //* A custom reason for the test to have failed
/** /**
* A counter-example to a test. * A counter-example to a test.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment