Each DDTT callable stub function is defined by a Stub Function Entry Specification. The following is syntax for a grammar file Stub Function Entry Specification:

   func_kwd $DLL=dll_name                     \
            $FUNC=@func_name$qr8Kwd_List                  \
     [param_kwd=param_type]...                \
     [$EXPECTED [param_kwd=param_type]...]

The complier name of the stub function's DLL entry point is @func_name$qr8Kwd_List. The name shown here is specific to Borland's OS/2 Version 1.5 C++ compiler. The function, func_name, is as it appears in the C++ function stub source. Use the prefix (@) and the appropriate compiler mangling suffix for all stub functions called by the DDTT.

Where param_type is defined as one of the following parameter type tokens:

param_type=NUM|ALPHA|ALNUM|STRING
Param_type token definitions:
NUM - All characters in this parameter must be numeric,
[0..9, +, -, .]
ALPHA - All characters in this parameter must be alphabetic,
[a..z, A..Z]
ALNUM - All characters in this parameter must be alphabetic or
numeric,[a..z, A..Z, 0..9, +, -, .]
STRING - Any character string or nothing (null string) may be
specified. This is the default param_type.

Each complete Stub Function Specification must be on a single logical line. Actual lines in the grammar file may be extended by placing backward slash, (\) as the last non-blank character in the line.

For OS/2, the dll_name must be a valid DDTT DLL file with the location specified in LIBPATH. The name of the stub function, func_kwd, is used in the test case script file. All func_kwds must be unique within a grammar file. The same param_kwd may be used for different functions. If the same param_kwd is used, then only one parameter keyword is created and the value of this parameter keyword is used for all functions specifying the same param_kwd. One or more param_kwds with param_type may be specified to pass data into the DDTT stub function. Param_kwds defined before the $EXPECTED keyword in the Stub Function Entry Specification are required. At runtime, DDTT's parser will not call a function specified in the test script unless all required param_kwds are defined and of the correct type. If the user attempts to call a stub function with incorrectly specified parameters, DDTT prints an error message identifying which function is not being called and what parameter(s) are incorrect.

If a script file calls a stub function without specifying EV_ or ET_ values for all $EXPECTED parameters then DDTT calls the function, checks any specified parameters and also prints a warning message to the log file specifying which expected parameters are missing.


[Back: Specifying Comments]
[Next: Automatic Expected Value Checking]