KCML_SetTestCallback

Purpose

Setup test harness

Definition

DEFSUB 'KCML_SetTestCallback(pattern$, BYREF pfnTests(), p AS SYM('KCML_Test_Callback_Prototype), lib$) AS Integer

Parameters

patternPrefix for test functions in the code
pfnTestsAn array of SYM values for the potential tests found in the program.
pThe callback function invoked in the event of an error.
libName of library containing the tests. Blank for the executing library.

Return

The number of test functions found and the size of the pfnTests() array.

Description

This function allows the application to set a callback to to be in the event of an error in a test run. It also returns an array of all the DEFSUBs in the local program that start with the pattern representing the tests to be run.

See also

Internal KCML Functions, Internally defined structures and Internally defined enumerations and constants.