Functions Containing Type Modifiers

Component Testing for C

Type modifiers can appear in the signature of the function but should not be used when manipulating any passed variables. When using type modifiers, add @ prefix to the type modifier keyword.

HCL® OneTest Embedded recognizes @-prefixed type modifiers in the function prototype, but ignores them when dealing internally with the parameters passed to and from the function.

This behavior is the default behavior for the "const" keyword, the '@' is not necessary for const.

Example

Consider a type modifier __foo

DEFINE STUB tst_cst

#int ModifParam(@__foo float _in param);

END DEFINE

Note In this example, __foo is not a standard ANSI-C feature. To force HCL® OneTest Embedded to recognize this keyword as a type modifier, you must add the following line to the .ptu test script:

##pragma attol type_modifier = __foo