summaryrefslogtreecommitdiff
path: root/test/ratnest.adb
blob: 8d1493c3131ecedf0463c4dca71dd33345f89ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


with

    Ada.Text_IO;

use

    Ada.Text_IO;


package body Ratnest is


    procedure Run_Tests
           (To_Run : in Test_Array)
    is
        Total_Count  : Natural := To_Run'Length;
        Failed_Count : Natural := 0;
    begin
        for T of To_Run loop
            if T.Func.all = Failure then
                Put_Line ("Failed test " & (-T.Name));
                Failed_Count := Failed_Count + 1;
            end if;
        end loop;
        Put_Line ("Test results" & Integer'Image (Total_Count - Failed_Count) &
            " out of" & Integer'Image (Total_Count));
    end Run_Tests;


end Ratnest;