tuple/value: correct the test case values

This commit is contained in:
Danny Robson 2020-02-25 11:31:56 +11:00
parent 40694c4138
commit eac5957f60
2 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ main (void)
);
tap.expect (
!cruft::tuple::value::all (std::tuple<bool,int> (true, 1)),
!cruft::tuple::value::all (std::tuple<bool,int> (true, 0)),
"tuple::all fails"
);
@ -53,7 +53,7 @@ main (void)
);
tap.expect (
cruft::tuple::value::none (std::tuple<bool,int> (false, 0)),
!cruft::tuple::value::none (std::tuple<bool,int> (false, 1)),
"tuple::none fails"
);

View File

@ -127,9 +127,9 @@ namespace cruft::tuple::value {
bool
none (TupleT &&val)
{
return none (
return all (
std::forward<TupleT> (val),
[] (auto const &i) { return bool (i); }
[] (auto const &i) { return !bool (i); }
);
}