Open kilian-gebhardt opened 1 year ago
I hit the pragma Assert (Counter = 0); in https://github.com/AdaCore/libadalang-tools/blob/263158611cf1b073db6733a9aa247c3a16f086d3/src/utils-drivers.adb#LL128C11-L128C38 when invoking gnattest with one ignore file that contained more than 1 file name (say 5).
pragma Assert (Counter = 0);
gnattest
The issue is that Arg_Length (Cmd, Ignore) only provides the number of ignore files but not the actual number of file names in those ignore files:
Arg_Length (Cmd, Ignore)
ignore
N_File_Names : constant Natural := Num_File_Names (Cmd) - Arg_Length (Cmd, Ignore); Counter : Natural := N_File_Names;
Counter subsequently get's decremented on every non-ignored file. Since Counter = N_File_Names - 1, Counter = 4 when the assertion is hit.
Counter
Counter = N_File_Names - 1
Counter = 4
I hit the
pragma Assert (Counter = 0);
in https://github.com/AdaCore/libadalang-tools/blob/263158611cf1b073db6733a9aa247c3a16f086d3/src/utils-drivers.adb#LL128C11-L128C38 when invokinggnattest
with one ignore file that contained more than 1 file name (say 5).The issue is that
Arg_Length (Cmd, Ignore)
only provides the number ofignore
files but not the actual number of file names in those ignore files:Counter
subsequently get's decremented on every non-ignored file. SinceCounter = N_File_Names - 1
,Counter = 4
when the assertion is hit.