Stubbing a body separately

Component Testing for Ada

Under certain circumstances, it may be useful to define the body stub separately, with a proprietary behavior.

To do this, declare the stub separately and then define a body for it.

Example

In the following example, Component Testing for Ada will not generate a body for the service My_Procedure, but will expect you to do so:

DEFINE STUB <STUB NAME>

# procedure My_Procedure(...) is separate ;

END DEFINE

 

Related Topics

Advanced StubsNative Code in StubsExcluding a Parameter from a StubSimulating Generic UnitsSimulating Functions with _inout Mode ArraysSimulating Functions that Use a Variable Number of Parameters