Next: , Previous: Simple Example, Up: Creating Unit Tests Using gnattest

26.5 Setting Up and Tearing Down the Testing Environment

Besides test routines themselves, each test package has an inner package Env_Mgmt that has two procedures: User_Set_Up and User_Tear_Down. User_Set_Up is called before each test routine of the package and User_Tear_Down is called after each test routine. Those two procedures can be used to perform necessary initialization and finalization, memory allocation, etc.