Stub memory allocation

Component Testing for Ada

For each STUB, the Component Testing feature allocates memory to:

A stub can be called several times during the execution of a test. By default, when you define a STUB, the Component Testing feature allocates space for 10 calls. This means that only the 10 first errors found in stub calls are displayed in the report and that any more errors are ignored. If you call the STUB more than 10 times, then you must specify the number of expected calls in the STUB declaration statement.

In the following example, the script allocates storage space for the first 17 calls to the stub:

DEFINE STUB file 17

 #procedure proc_inout (param1 : in out integer) is

 #begin

 # param1:=param1+1

 #end proc_inout

END DEFINE

 

You can also reduce the stub allocation value to a lower value when running tests on a target platform that is short on memory resources.

Related Topics

Stub SimulationDefining StubsUsing StubsAda Syntax ExtensionsAdvanced Stubs (Ada)