GNATTEST(1)
π GNATTEST π
okay so bestie, welcome to the manual page for gnattest β a lil tool from the ASIS Tools collection, and honestly? she's giving β¨test-fairy godmotherβ¨. Her whole job is making AUnit test skeletons and a harness for a project, so you don't have to hand-write all that boilerplate yourself. You're welcome π
β¨ NAME β¨
gnattest β Create AUnit test skeletons and harness for a project π
πΈ SYNOPSIS πΈ
gnattest -Pprojname [-harness-dir=dirname] [switches] [filename] [-cargs gcc_switches]
That's the whole vibe, bestie. Project name, optional harness dir, whatever switches you want, maybe a filename, and then any gcc switches you wanna hand off. π«Ά
π DESCRIPTION π
gnattest is an ASIS-based utility that creates unit-test skeletons as well as a test driver infrastructure (the harness). For real for real β it does both. And here's the slay part: gnattest creates a skeleton for each visible subprogram in the packages under consideration when they don't already exist. Not me being obsessed with not overwriting your work π
Now, the plot twist: in order to process source files from a project, gnattest has to semantically analyze the sources. So no skipping that step. Which means β and this is the key part β test skeletons can only be generated for legal Ada units. If your Ada doesn't compile as an Ada unit, she simply cannot help you. It's giving "fix your code first" π
Also, dependency check time: if a unit is dependent on other units, those units should be among the source files of the project or of other projects imported by this one. Like, she needs the whole friend group present at the party, not just the main character. π
Generated skeletons and harnesses are based on the AUnit testing framework. And for context: AUnit is an Ada adaptation of the xxxUnit testing frameworks, similar to JUnit for Java or CppUnit for C++. So if you've ever touched JUnit or CppUnit, you already know the genre π
While it is advised that gnattest users read the AUnit manual, deep knowledge of AUnit is not necessary for using gnattest. Phew. Reading is encouraged, not required. Lowkey a green flag. β¨
BUT β and this one matters β for correct operation of gnattest, the libaunitV-dev package should be installed. The appropriate version V is given in the Recommends field of the asis-programs package (the one containing this manual page). So like, the manual you're reading right now tells you which V you need. iykyk π§
tl;dr bestie: installlibaunitV-dev, check theRecommendsfield ofasis-programsto find out whatVactually is, and you're golden. π
π¦ SEE ALSO π¦
Documentation about the ASIS tools may be found in /usr/share/doc/asis-doc/ β that is, if the asis-doc package is installed. So like, go install it if you want the lore π
The reference documentation about gnattest, the GNAT User Guide, can unfortunately not be distributed by Debian due to license problems, which is a genuine tragedy, no cap π but may be found in various formats at https://gcc.gnu.org/onlinedocs/. So the tea is still out there, just not in Debian's pantry. Go get it bestie. π
Version check: this page ships with the asis-programs package on Debian GNU/Linux, dated 2014-08-09. Ty for coming to my ted talk, go write some tests π
πβ¨
π¦ where this page comes from
- ubuntu jammy: asis-programs 2019-5 Β· GPL-3.0-or-later
- Copyright (C) 2014 Nicolas Boulenguez <nicolas@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms