assertExists

Asserts that a item exists inside a range.

  1. void assertExists(T[] haystack, T needle, string msg, string file, size_t line)
  2. void assertExists(T[len] haystack, T needle, string msg, string file, size_t line)
  3. void assertExists(R haystack, T needle, string msg, string file, size_t line)
    @safe pure
    void
    assertExists
    (
    R
    T
    )
    (,,
    lazy string msg = null
    ,
    string file = __FILE__
    ,
    size_t line = __LINE__
    )
    if (
    isInputRange!R &&
    is(typeof(haystack.front == needle))
    )

Throws

AssertException otherwise

Meta