source: trunk/test/config_test.cc @ 809

Last change on this file since 809 was 693, checked in by Jari Häkkinen, 13 years ago

Fixes #339. Change to GPLv3.

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