GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/OptionParser/TESTS/TEST_ParserOptionNone/main.cpp Lines: 12 12 100.0 %
Date: 2023-10-11 10:52:07 Branches: 13 13 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 "phoenix_check.h"
9
#include "OptionParser.h"
10
11
///Create the OptionParser of this program
12
/**	@return OptionParser of this program
13
*/
14
2
OptionParser createOptionParser(){
15
4
	OptionParser parser(true, "1.0.0");
16

2
	parser.addOption("mode", "m", OptionType::NONE, true, "Required option");
17
2
	return parser;
18
}
19
20
2
int main(int argc, char** argv){
21
2
	OptionParser parser = createOptionParser();
22
2
	parser.parseArgument(argc, argv);
23
24
2
	const OptionMode & defaultMode = parser.getDefaultMode();
25
2
	bool b(true);
26
2
	b &= defaultMode.isOptionExist("mode");
27
2
	phoenix_functionOk("final", b);
28
2
	return b - 1;
29
}
30
31