Expect.toContain

Succeeds if received contains the expected element or sub-range, or at least one element satisfying the given predicate.

The predicate overload takes a function whose return type is bool, and whose single parameter is of a type that received's elements can implicitly convert to.

  1. void toContain(TExpected expected)
  2. void toContain(bool delegate(const(ElementType!TReceived)) predicate)
    struct Expect(TReceived)
    static if(isInputRange!TReceived && is(ElementType!TReceived))
    void
    toContain
    (
    bool delegate
    (
    const(ElementType!TReceived)
    )
    predicate
    )

Meta