Failing COBOL syntax within a test case causes the test to fail and displays the standard COBOL error messaging in the test case summary, within the test output.
To control the outcome of a test case, you can place assertions within your test code that determine a failing or successful test. You can manually set a non-zero return code to mark a test as failed, or you can conditionally call one of the following library routines:
These all mark the test as failed, and enable you to include user-defined messages within a test report.
To use these library routines, ensure that your test cases can access the mfunit_prototypes.cpy copybook. This copybook is supplied in the cpylib sub-directory of your installation directory, and is used for call prototyping when you call any of the above library routines.
Test cases that run to completion without any of the above occurring or are coded to return a return code of zero are considered to have passed.