Expect.toContainOnly

Succeeds if all elements in received are equal to expected, or satisfy 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 toContainOnly(TExpected expected)
    struct Expect(TReceived)
    void
    toContainOnly
    (
    TExpected
    )
    (
    TExpected expected
    )
    if (
    __traits(compiles, rvalueOf!(ElementType!TReceived) == expected)
    )
  2. void toContainOnly(bool delegate(const(ElementType!TReceived)) predicate)

Meta