-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CmdLineParser: return enum from parseFromArgs()
instead of using additional member
#5698
Conversation
Requires #5676 to be merged first. |
@@ -104,6 +104,19 @@ class TestCmdlineParser : public TestFixture { | |||
// TODO: verify that the redirect output is empty | |||
} | |||
|
|||
// add specialization so the enums can be compared without a cast | |||
template<typename T, typename U> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add the general version because I cannot create a specialization for the template in the parent class.
test/testcmdlineparser.cpp
Outdated
} | ||
|
||
template<> | ||
bool assertEquals<CmdLineParser::Result, CmdLineParser::Result>(const char* const filename, const unsigned int linenr, const CmdLineParser::Result& expected, const CmdLineParser::Result& actual) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the specialization so I didn't have to introduce hundreds of static_cast
into the asserts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we find a way to simply this specialization we can clean up other tests.
866868a
to
2b48af7
Compare
No description provided.