File: aunit_example.adb

package info (click to toggle)
gprbuild 2014dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,564 kB
  • ctags: 195
  • sloc: ada: 110,384; xml: 3,632; sh: 2,810; makefile: 363; ansic: 204; cpp: 89; fortran: 62; asm: 27
file content (35 lines) | stat: -rw-r--r-- 1,340 bytes parent folder | download | duplicates (3)
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
35
--  Abstract :
--
--  Example AUnit test; show that gprbuild accesses the default gpr
--  search path.
--
--  Copyright (C) 2010 Stephen Leake.  All Rights Reserved.
--
--  This program is free software; you can redistribute it and/or
--  modify it under terms of the GNU General Public License as
--  published by the Free Software Foundation; either version 3, or (at
--  your option) any later version. This program is distributed in the
--  hope that it will be useful, but WITHOUT ANY WARRANTY; without even
--  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
--  PURPOSE. See the GNU General Public License for more details. You
--  should have received a copy of the GNU General Public License
--  distributed with this program; see file COPYING. If not, write to
--  the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
--  MA 02111-1307, USA.

pragma License (GPL);

with AUnit.Test_Cases;
with AUnit.Assertions;
with AUnit.Test_Results.Text_Reporter;
with AUnit.Test_Suites; use AUnit.Test_Suites;
with Example_Test;
procedure Aunit_Example
is
   Suite  : constant Access_Test_Suite := new Test_Suite;
   Result : AUnit.Test_Results.Result;
begin
   Add_Test (Suite, new Example_Test.Test_Case);
   Run (Suite.all, Result);
   AUnit.Test_Results.Text_Reporter.Report (Result);
end Aunit_Example;