GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/OptionParser/TESTS/TEST_ParseOption/main.cpp Lines: 14 14 100.0 %
Date: 2024-12-09 15:30:52 Branches: 26 26 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
///Create the OptionParser of this program
11
/**	@return OptionParser of this program
12
*/
13
2
OptionParser createOptionParser(){
14
4
	OptionParser parser(true, "1.0.0");
15
2
	parser.setExampleLongOption("dps --version");
16
2
	parser.setExampleShortOption("dps -v");
17
18

2
	parser.addOption("plugin", "p", OptionType::FILENAME, true, std::string("Required option"));
19

2
	parser.addOption("otherplugin", "q", OptionType::FILENAME, true, false, "other Required option");
20
21
4
	std::string defaultConfigHost("");
22

2
	parser.addOption("config", "c", defaultConfigHost, "Optional value");
23
24

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