anyOf function

Matcher anyOf(
  1. Object? arg0,
  2. [Object? arg1,
  3. Object? arg2,
  4. Object? arg3,
  5. Object? arg4,
  6. Object? arg5,
  7. Object? arg6]
)

Matches if any of the given matchers evaluate to true.

The arguments can be a set of matchers as separate parameters (up to 7), or a List of matchers.

The matchers are evaluated from left to right using short-circuit evaluation, so evaluation stops as soon as a matcher returns true.

Any argument that is not a matcher is implicitly wrapped in a Matcher to check for equality.

Implementation

Matcher anyOf(Object? arg0,
    [Object? arg1,
    Object? arg2,
    Object? arg3,
    Object? arg4,
    Object? arg5,
    Object? arg6]) {
  return _AnyOf(_wrapArgs(arg0, arg1, arg2, arg3, arg4, arg5, arg6));
}