Create test programs, test cases and and script to run. These tests should check ASIS library.
I organize test as set of test programs, test cases (compilable Ada sources) and results of execution test programs on test cases. Makefile builds test programs with our ASIS library, runs them on test cases and compares results with stored in repository.
Each test program runs as
./open a0001.adb body a0001
Where
- ./open - name of the test
- a0001.adb - file with test case
- body (or spec) - choise of specificatio or body of tested unit
- a0001 - name of tested unit
Existing test program:
- Open - just open ASIS context. It includes parsing sources, building AST and run all passes over it. All test cases should open without errors, so result is an empty file.
- Walk - walks over ASIS AST and dump each encountered (explicit) Ada construct.
- Name - print corresponding declaration for each name in a test case.