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)
    struct Expect(TReceived)
    void
    toContain
    (
    TExpected
    )
    (
    TExpected expected
    )
    if (
    __traits(compiles, received.canFind(expected))
    )
  2. void toContain(bool delegate(const(ElementType!TReceived)) predicate)

Meta