UnitTestFailsReason

Typestatement
DictionaryLCB
LibraryLiveCode Builder
Syntax
broken test <Condition> because <Reason>
Associationscom.livecode.unittest
Summary

Make a failing unit test assertion with a reason for brokenness

Parameters
NameTypeDescription
Condition

An expression that evaluates to true if the test is successful

Reason

A short explanation of why the test is broken

Example
broken test 1 > 2 because "bug 12345"
Description

Make a unit test assertion, in the expectation that it will fail. The test is considered to have passed if Condition is true. The Reason is a shor message that describes why the test is broken (usually referencing a bug report).

If the test fails, it will not cause a test suite failure; instead, an "expected failure" will be recorded. If the test passes, an "unexpected pass" will be recorded instead of a normal test pass.

Tagsunit tests,unit tests