Test a function: Difference between revisions

m
→‎{{header|Phix}}: added output comment
m (→‎{{header|Phix}}: added invoke test_summary() note.)
m (→‎{{header|Phix}}: added output comment)
Line 1,569:
unless set_test_abort() other than TEST_QUIET is in force. You can of course invoke these routines in a platform-dependent <br>
way, for instance pause on the desktop but abort/stop completely in the browser, should that help.
 
Should you invoke a bunch of tests but forget the final test_summary(), then apart from set_test_abort(TEST_CRASH) any
failures ''will'' slip by completely unnoticed.
{{out}}
The following shows example output from various set_test_verbosity() settings, with and without any failures.
 
TEST_QUIET with a failing test (no output or pause if no failing tests)<br>
TEST_SUMMARY with a failure, same output
Line 1,578 ⟶ 1,583:
Press any key to continue...
</pre>
TEST_SUMMARY with no failure (and w/owithout set_test_pause(1TEST_PAUSE))<br>
TEST_SHOW_FAILED with no failure, ditto
<pre>
Line 1,603 ⟶ 1,608:
Press any key to continue...
</pre>
TEST_SHOW_ALL with no failure (and w/owithout set_test_pause(TEST_PAUSE))
<pre>
palindromes:
7,796

edits