Creating complex stubs
Component Testing for Ada
If necessary, you can make stub operation more complex by inserting native Ada code into the body of the simulated function. You can do this easily by adding the lines of native code after the prototype.
Example
The following stub definition makes extensive use of native Ada code.
DEFINE STUB file
#function open_file(f:string) return file_t is
#begin
# raise file_error;
#end;
END DEFINE
Related Topics
Advanced Stubs | Excluding a Parameter from a Stub | Simulating Generic Units | Simulating Functions with _inout Mode Arrays | Simulating Functions that Use a Variable Number of Parameters | Separate Body Stub