Lumiera  0.pre.03
»edit your freedom«
app-config-test.cpp
Go to the documentation of this file.
1 /*
2  Appconfig(Test) - accessing the always-available AppState singleton
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program 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 General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
29 #include "lib/test/run.hpp"
30 #include "include/config-facade.h"
31 #include "lib/symbol.hpp"
32 #include "lib/util.hpp"
33 
34 using lib::Literal;
35 using util::isnil;
36 
37 
38 
39 namespace lumiera {
40 namespace test {
41 
42 
43  class Appconfig_test : public Test
44  {
45  virtual void
46  run (Arg)
47  {
49  }
50 
51 
54  {
55  Literal key("Lumiera.version");
56  string ver = Config::get(key);
57  CHECK (!isnil(ver));
58  }
59  };
60 
61 
62  LAUNCHER (Appconfig_test, "function common");
63 
64 
65 }} // namespace util::test
66 
Definition: run.hpp:49
inline string literal This is a marker type to indicate that
Definition: symbol.hpp:85
static string get(lib::Literal key)
The lumiera::Config wrapper class addresses two issues.
Marker types to indicate a literal string and a Symbol.
Simple test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Lumiera public interface.
Definition: advice.cpp:113