Directory: | ./ |
---|---|
File: | TESTS/TEST_GET_ARGUMENT_LIST/main.cpp |
Date: | 2024-07-27 10:53:27 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 12 | 12 | 100.0% |
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 |
1/1✓ Branch 1 taken 3 times.
|
3 | std::list<std::string> listArg = phoenix_getArgumentList(argc, argv); |
14 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 5 taken 3 times.
✓ Branch 8 taken 3 times.
✓ Branch 11 taken 3 times.
|
3 | std::cout << "Get " << listArg.size() << " arguments" << std::endl; |
15 |
5/5✓ Branch 1 taken 3 times.
✓ Branch 5 taken 3 times.
✓ Branch 8 taken 3 times.
✓ Branch 11 taken 3 times.
✓ Branch 14 taken 3 times.
|
3 | std::cout << "Is --help exist " << phoenix_isOptionExist(listArg, "--help") << std::endl; |
16 |
6/6✓ Branch 1 taken 3 times.
✓ Branch 5 taken 3 times.
✓ Branch 9 taken 3 times.
✓ Branch 12 taken 3 times.
✓ Branch 15 taken 3 times.
✓ Branch 18 taken 3 times.
|
3 | std::cout << "Is --help or -h exist " << phoenix_isOptionExist(listArg, "--help", "-h") << std::endl; |
17 |
5/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
|
3 | std::cout << "String of all arguments '"<<phoenix_listArgToString(listArg)<<"'" << std::endl; |
18 |
5/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
|
3 | std::cout << "Get program call '"<<phoenix_getProgramCall(listArg)<<"'" << std::endl; |
19 |
1/1✓ Branch 1 taken 3 times.
|
3 | phoenix_rmProgramCall(listArg); |
20 |
5/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
|
3 | std::cout << "Get first argument '"<<phoenix_getProgramCall(listArg)<<"'" << std::endl; |
21 |
5/5✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
|
3 | std::cout << "String of all arguments without program call '"<<phoenix_listArgToString(listArg)<<"'" << std::endl; |
22 | 3 | return 0; | |
23 | 3 | } | |
24 | |||
25 | |||
26 |