mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
const methods
This commit is contained in:
parent
a68d7b78dc
commit
1e5d6ecfbb
2 changed files with 6 additions and 6 deletions
|
|
@ -11,7 +11,7 @@ ArgumentsReader::ArgumentsReader(int argc, char**argv)
|
|||
}
|
||||
}
|
||||
|
||||
bool ArgumentsReader::findArgumentListIndex(const string & argumentName, int & outFrom, int & outCount)
|
||||
bool ArgumentsReader::findArgumentListIndex(const string & argumentName, int & outFrom, int & outCount) const
|
||||
{
|
||||
if (_arguments.empty())
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ bool ArgumentsReader::findArgumentListIndex(const string & argumentName, int & o
|
|||
}
|
||||
|
||||
|
||||
vector<string> ArgumentsReader::extractValues(const string & argumentName)
|
||||
vector<string> ArgumentsReader::extractValues(const string & argumentName) const
|
||||
{
|
||||
int from, count;
|
||||
if (!findArgumentListIndex(argumentName, from, count))
|
||||
|
|
@ -69,7 +69,7 @@ vector<string> ArgumentsReader::extractValues(const string & argumentName)
|
|||
}
|
||||
|
||||
|
||||
string ArgumentsReader::getArgument(int index)
|
||||
string ArgumentsReader::getArgument(int index) const
|
||||
{
|
||||
return _arguments[index];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ namespace UnitTest {
|
|||
{
|
||||
public:
|
||||
ArgumentsReader(int argc, char**argv);
|
||||
bool findArgumentListIndex(const string & argumentName, int & outFrom, int & outCount);
|
||||
vector<string> extractValues(const string & argumentName);
|
||||
string getArgument(int index);
|
||||
bool findArgumentListIndex(const string & argumentName, int & outFrom, int & outCount) const;
|
||||
vector<string> extractValues(const string & argumentName) const;
|
||||
string getArgument(int index) const;
|
||||
|
||||
private:
|
||||
vector<string> _arguments;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue