1--
2--  Copyright (c) 2009,
3--  Reto Buerki, Adrian-Ken Rueegsegger
4--
5--  This file is part of Alog.
6--
7--  Alog is free software; you can redistribute it and/or modify
8--  it under the terms of the GNU Lesser General Public License as published
9--  by the Free Software Foundation; either version 2.1 of the License, or
10--  (at your option) any later version.
11--
12--  Alog is distributed in the hope that it will be useful,
13--  but WITHOUT ANY WARRANTY; without even the implied warranty of
14--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15--  GNU Lesser General Public License for more details.
16--
17--  You should have received a copy of the GNU Lesser General Public License
18--  along with Alog; if not, write to the Free Software
19--  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20--  MA  02110-1301  USA
21
22--  Logging facility used for testing. Raises a Constraint_Error when Write()
23--  is called.
24package Alog.Facilities.Mock is
25
26   type Instance is new Alog.Facilities.Instance with private;
27
28   type Handle is access all Instance;
29
30   overriding
31   procedure Write
32     (Facility : Instance;
33      Level    : Log_Level := Info;
34      Msg      : String);
35   --  Implementation of Write.
36
37   overriding
38   procedure Setup (Facility : in out Instance) is null;
39   --  Implementation of Setup procedure.
40
41   overriding
42   procedure Teardown (Facility : in out Instance) is null;
43   --  Implementation of Teardown procedure.
44
45   Exception_Message : constant String := "DON'T PANIC! Test exception";
46
47private
48
49   type Instance is new Alog.Facilities.Instance with null record;
50
51end Alog.Facilities.Mock;
52