GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/OptionParser/TESTS/TEST_ParseOption/main.cpp Lines: 13 13 100.0 %
Date: 2023-10-11 10:52:07 Branches: 22 22 100.0 %

Line Branch Exec Source
1
2
/***************************************
3
	Auteur : Pierre Aubert
4
	Mail : pierre.aubert@lapp.in2p3.fr
5
	Licence : CeCILL-C
6
****************************************/
7
8
#include "OptionParser.h"
9
10
using namespace std;
11
12
///Create the OptionParser of this program
13
/**	@return OptionParser of this program
14
*/
15
1
OptionParser createOptionParser(){
16
2
	OptionParser parser(true, "1.0.0");
17
1
	parser.setExampleLongOption("dps --version");
18
1
	parser.setExampleShortOption("dps -v");
19
20

1
	parser.addOption("plugin", "p", OptionType::FILENAME, true, "Required option");
21
22
2
	std::string defaultConfigHost("");
23

1
	parser.addOption("config", "c", defaultConfigHost, "Optional value");
24
25

1
	parser.addOption("loadonly", "l", OptionType::NONE, false, "Optional Trigger option");
26
2
	return parser;
27
}
28
29
1
int main(int argc, char** argv){
30
1
	OptionParser parser = createOptionParser();
31
1
	parser.parseArgument(argc, argv);
32
1
	return 0;
33
}
34
35