GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/OptionParser/TESTS/TEST_GET_ARGUMENT_LIST/main.cpp Lines: 11 11 100.0 %
Date: 2024-12-09 15:30:52 Branches: 37 37 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 <iostream>
9
#include "get_argument_list.h"
10
11
12
3
int main(int argc, char** argv){
13
3
	std::list<std::string> listArg = phoenix_getArgumentList(argc, argv);
14

3
	std::cout << "Get " << listArg.size() << " arguments" << std::endl;
15

3
	std::cout << "Is --help exist " << phoenix_isOptionExist(listArg, "--help") << std::endl;
16

3
	std::cout << "Is --help or -h exist " << phoenix_isOptionExist(listArg, "--help", "-h") << std::endl;
17

3
	std::cout << "String of all arguments '"<<phoenix_listArgToString(listArg)<<"'" << std::endl;
18

3
	std::cout << "Get program call '"<<phoenix_getProgramCall(listArg)<<"'" << std::endl;
19
3
	phoenix_rmProgramCall(listArg);
20

3
	std::cout << "Get first argument '"<<phoenix_getProgramCall(listArg)<<"'" << std::endl;
21

3
	std::cout << "String of all arguments without program call '"<<phoenix_listArgToString(listArg)<<"'" << std::endl;
22
3
	return 0;
23
}
24
25