mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
Add support for multiply calling lambda parsers in Clara
Previously a lambda parser in Clara could only be invoked once, even if it internally was ok with being invoked multiple times. With this change, a lambda parser can mark itself as `accept_many`, in which case it will be invoked multiple times if the appropriate flag was supplied multiple times by the user.
This commit is contained in:
@@ -698,6 +698,12 @@ ok {test-number} - c == i for: 5 == 5
|
||||
ok {test-number} - name.empty() for: true
|
||||
# Clara::Arg supports single-arg parse the way Opt does
|
||||
ok {test-number} - name == "foo" for: "foo" == "foo"
|
||||
# Clara::Opt supports accept-many lambdas
|
||||
ok {test-number} - !(parse_result) for: !{?}
|
||||
# Clara::Opt supports accept-many lambdas
|
||||
ok {test-number} - parse_result for: {?}
|
||||
# Clara::Opt supports accept-many lambdas
|
||||
ok {test-number} - res == std::vector<std::string>{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" }
|
||||
# Combining MatchAllOfGeneric does not nest
|
||||
ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value'
|
||||
# Combining MatchAllOfGeneric does not nest
|
||||
@@ -3786,6 +3792,30 @@ ok {test-number} -
|
||||
# even more nested SECTION tests
|
||||
ok {test-number} -
|
||||
loose text artifact
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary2)>::value'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary3)>::value'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary4)>::value'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary5)>::value'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary6)>::value'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(binary1)>::value)'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(binary2)>::value)'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(nullary1)>::value)'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(nullary2)>::value)'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<int>::value)'
|
||||
# is_unary_function
|
||||
ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<std::string const&>::value)'
|
||||
# just failure
|
||||
not ok {test-number} - explicitly with 1 message: 'Previous info should not be seen'
|
||||
# just failure after unscoped info
|
||||
@@ -4290,5 +4320,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2144
|
||||
1..2159
|
||||
|
||||
|
Reference in New Issue
Block a user