Assertion.include

Asserts for an input range wrapped around an Assertion to contain/include a value.

  1. U include(U other, string file, size_t line)
  2. U include(U other, string file, size_t line)
    struct Assertion(T)
    version(MirNoGCException)
    @trusted
    static if(isInputRange!T || isArray!T || isAssociativeArray!T)
    U
    include
    (
    U
    )
    (,
    string file = __FILE__
    ,
    size_t line = __LINE__
    )
    if (
    isAssociativeArray!T
    )
  3. U include(U other, string file, size_t line)

Examples

[1, 2, 3, 4].should.include(3);
"something".should.not.include('o');
"something".should.include("th");

Meta