assertExistsInArray

Asserts that the item exists inside the given array

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

Throws

AssertException otherwise

Meta