source: trunk/test/config_test.cc @ 847

Last change on this file since 847 was 847, checked in by Peter Johansson, 12 years ago

updating copyrights

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1// $Id: config_test.cc 847 2009-11-17 01:38:52Z peter $
2
3/*
4  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
5  Copyright (C) 2009 Peter Johansson
6
7  This file is part of svndigest, http://dev.thep.lu.se/svndigest
8
9  svndigest is free software; you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 3 of the License, or
12  (at your option) any later version.
13
14  svndigest is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#include "Configuration.h"
24
25namespace theplu{
26namespace svndigest{
27  bool test_codon(void);
28}} // end of namespace svndigest and theplu
29
30
31int main( int argc, char* argv[])
32{
33  using namespace theplu::svndigest;
34  bool ok=true;
35
36  ok &= test_codon();
37                                                                               
38  if (ok)
39    return 0;
40  return 1;
41}
42
43
44namespace theplu{
45namespace svndigest{
46
47  bool test_codon(void)
48  {
49    const Configuration& c(Configuration::instance());
50    bool ok =true;
51    if (!c.codon("foo.h")){
52      std::cerr << "No codon for foo.h\n";
53      ok = false;
54    }
55    if (!c.codon("../dir/test.cc")){
56      std::cerr << "No codon for test.cc\n";
57      ok = false;
58    }
59
60    return ok;
61  }
62 
63}} // end of namespace svndigest and theplu
Note: See TracBrowser for help on using the repository browser.