GCC Code Coverage Report


Directory: ./
File: pdserv-1.1.0/test/config.cpp
Date: 2023-11-12 04:06:57
Exec Total Coverage
Lines: 0 11 0.0%
Branches: 0 34 0.0%

Line Branch Exec Source
1 /*****************************************************************************
2 *
3 * $Id$
4 *
5 * Copyright 2010 Richard Hacker (lerichi at gmx dot net)
6 *
7 * This file is part of the pdserv library.
8 *
9 * The pdserv library is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation, either version 3 of the License, or (at
12 * your option) any later version.
13 *
14 * The pdserv library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 * License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with the pdserv library. If not, see <http://www.gnu.org/licenses/>.
21 *
22 *****************************************************************************/
23
24 #include <iostream>
25 #include "../src/Config.h"
26
27 using namespace std;
28
29 int main(int argc, char **argv)
30 {
31 PdServ::Config conf;
32
33 if (argc > 1) {
34 const char *err = conf.load(argv[1]);
35 if (err) {
36 cout << err << endl;
37 return 1;
38 }
39 }
40
41 PdServ::Config c(conf["lan"]);
42 cout << (int)conf["lan"] << endl;
43 cout << (int)conf["lan"]["msr"]["port"] << endl;
44
45
46 return 0;
47 }
48