We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2d3681 commit c1d1e74Copy full SHA for c1d1e74
1 file changed
tests.cpp
@@ -23,7 +23,8 @@ struct result {
23
char* argv[] = {#name, ##__VA_ARGS__}; \
24
int argc = sizeof(argv) / sizeof(argv[0]); \
25
ArgumentParser parser(#name); \
26
- code return {true, 0, "", "", ""}; \
+ code; \
27
+ return {true, 0, "", "", ""}; \
28
}
29
30
TEST(no_args, {
@@ -82,9 +83,10 @@ TEST(short_required_flag_does_not_exist, {
82
83
#define TT(name) \
84
{ #name, name }
85
using test = std::function<result()>;
-std::map<std::string, test> tests{
86
- TT(short_optional_flag_exists), TT(short_optional_flag_does_not_exist),
87
- TT(short_required_flag_exists), TT(short_required_flag_does_not_exist)};
+std::map<std::string, test> tests{TT(no_args), TT(short_optional_flag_exists),
+ TT(short_optional_flag_does_not_exist),
88
+ TT(short_required_flag_exists),
89
+ TT(short_required_flag_does_not_exist)};
90
91
int main(int argc, const char* argv[]) {
92
std::vector<result> results;
0 commit comments