Hi,
I would like to learn about automated unit testing, because I’m lazy and hate writing the same code over and over, but I read that GNATTest has been dead for four years because it uses ASIS ?
So its menu entry has been sitting there in plain sight in gnatstudio, doing nothing, for years ?
You can get it via Alire in libadalang_tools
(along with gnatmetric, gnatpp, and gnatstub).
gnattest has been rewritten with Libadalang. You can install it with alire:
alr install --prefix=where_you_want_it libadalang_tools
Not at easy to handle as gnatprove…
I tried gnattest --harness-dir=. -P spreadsheet.gpr
as in their “simple example” here and I get those messages:
gnattest: spreadsheet_config.gpr:2:06: imported project file “ansiada.gpr” not found
gnattest: spreadsheet_config.gpr:2:06: imported by “/home/drm/Documents/Administration/Ada/spreadsheet/config/spreadsheet_config.gpr”
gnattest: spreadsheet_config.gpr:2:06: imported by “/home/drm/Documents/Administration/Ada/spreadsheet/spreadsheet.gpr”
gnattest: spreadsheet_config.gpr:3:06: imported project file “gnatcoll.gpr” not found
gnattest: spreadsheet_config.gpr:3:06: imported by “/home/drm/Documents/Administration/Ada/spreadsheet/config/spreadsheet_config.gpr”
gnattest: spreadsheet_config.gpr:3:06: imported by “/home/drm/Documents/Administration/Ada/spreadsheet/spreadsheet.gpr”
try “gnattest --help” for more information.
Even if the program runs fine. Does it look like a bug ? No test or harness is created either