PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
main.cpp
Go to the documentation of this file.
1
2
/***************************************
3
Auteur : Pierre Aubert
4
Mail : pierre.aubert@lapp.in2p3.fr
5
Licence : CeCILL-C
6
****************************************/
7
8
#include "
phoenix_assert.h
"
9
#include "
phoenix_check.h
"
10
#include "
OptionParser.h
"
11
13
15
OptionParser
createOptionParser
(){
16
OptionParser
parser
(
true
,
"1.0.0"
);
17
parser
.addOption(
"input"
,
"i"
,
OptionType::FILENAME
,
true
,
"Required option"
);
18
return
parser
;
19
}
20
21
int
main
(
int
argc,
char
** argv){
22
OptionParser
parser
=
createOptionParser
();
23
parser
.parseArgument(argc, argv);
24
25
const
OptionMode
& defaultMode =
parser
.getDefaultMode();
26
std::list<std::string> listInputFile;
27
defaultMode.
getValue
(listInputFile,
"input"
);
28
// std::cout << "input = {" << std::endl;
29
// for(std::list<std::string>::iterator it(listInputFile.begin()); it != listInputFile.end(); ++it){
30
// std::cout << "\t'" << *it << "'" << std::endl;
31
// }
32
// std::cout << "}" << std::endl;
33
std::list<std::string> listReference;
34
listReference.push_back(
"fileName1.txt"
);
35
listReference.push_back(
"fileName2.txt"
);
36
listReference.push_back(
"fileName3.txt"
);
37
phoenix_assert
(
phoenix_check
(
"Check list input"
, listInputFile, listReference));
38
return
0;
39
}
40
41
OptionMode::getValue
bool getValue(T &value, const std::string &optionName) const
Get the value of the option.
Definition:
OptionMode_impl.h:18
phoenix_check
bool phoenix_check(const std::string &testName, const std::string &val, const std::string &reference)
Check two string.
Definition:
phoenix_check.cpp:17
createReleaseCurl.parser
parser
Definition:
createReleaseCurl.py:123
OptionParser
Parse the options passed to a program.
Definition:
OptionParser.h:15
phoenix_assert
#define phoenix_assert(isOk)
Definition:
phoenix_assert.h:19
OptionParser.h
createOptionParser
OptionParser createOptionParser()
Create the OptionParser of this program.
Definition:
main.cpp:13
phoenix_assert.h
main
int main(int argc, char **argv)
Definition:
main.cpp:85
OptionMode
Describe a mode in the program arguments.
Definition:
OptionMode.h:13
OptionType::FILENAME
@ FILENAME
Definition:
OptionType.h:26
phoenix_check.h
tmp_project
OptionParser
TESTS
TEST_ParserOptionListString
main.cpp
Generated on Mon Dec 9 2024 15:33:41 for PhoenixMock by
1.8.17