aunit-run.ads

1------------------------------------------------------------------------------
2-- --
3-- GNAT COMPILER COMPONENTS --
4-- --
5-- A U N I T . R U N --
6-- --
7-- S p e c --
8-- --
9-- --
10-- Copyright (C) 2006-2011, AdaCore --
11-- --
12-- GNAT is free software; you can redistribute it and/or modify it under --
13-- terms of the GNU General Public License as published by the Free Soft- --
14-- ware Foundation; either version 3, or (at your option) any later ver- --
15-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17-- or FITNESS FOR A PARTICULAR PURPOSE. --
18-- --
19-- As a special exception under Section 7 of GPL version 3, you are granted --
20-- additional permissions described in the GCC Runtime Library Exception, --
21-- version 3.1, as published by the Free Software Foundation. --
22-- --
23-- You should have received a copy of the GNU General Public License and --
24-- a copy of the GCC Runtime Library Exception along with this program; --
25-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
26-- <http://www.gnu.org/licenses/>. --
27-- --
28-- GNAT is maintained by AdaCore (http://www.adacore.com) --
29-- --
30------------------------------------------------------------------------------
31
32with AUnit.Options;
33with AUnit.Reporter;
34with AUnit.Test_Results;
35with AUnit.Test_Suites;
36
37-- Framework using text reporter
38package AUnit.Run is
39
40 generic
41 with function Suite return AUnit.Test_Suites.Access_Test_Suite;
42 procedure Test_Runner
43 (Reporter : AUnit.Reporter.Reporter'Class;
44 Options : AUnit.Options.AUnit_Options := AUnit.Options.Default_Options);
45
46 generic
47 with function Suite return AUnit.Test_Suites.Access_Test_Suite;
48 procedure Test_Runner_With_Results
49 (Reporter : AUnit.Reporter.Reporter'Class;
50 Results : in out AUnit.Test_Results.Result'Class;
51 Options : AUnit.Options.AUnit_Options := AUnit.Options.Default_Options);
52 -- In this version, you can pass your own Result class. In particular, this
53 -- can be used to extend the Result type so that for instance you can
54 -- output information every time a test passed or fails.
55 -- Results is not cleared before running the tests, this is your
56 -- responsibility, so that you can for instance cumulate results as needed.
57
58 generic
59 with function Suite return AUnit.Test_Suites.Access_Test_Suite;
60 function Test_Runner_With_Status
61 (Reporter : AUnit.Reporter.Reporter'Class;
62 Options : AUnit.Options.AUnit_Options := AUnit.Options.Default_Options)
63 return Status;
64
65end AUnit.Run;