shouldBeIn

Verify that the value is in the container.

  1. void shouldBeIn(T value, U container, string file, size_t line)
  2. void shouldBeIn(T value, U container, string file, size_t line)
    void
    shouldBeIn
    (
    T
    U
    )
    (
    in T value
    ,,
    in string file = __FILE__
    ,
    in size_t line = __LINE__
    )
    if (
    !isAssociativeArray!U &&
    isInputRange!U
    )

Throws

UnitTestException on failure

Examples

shouldBeIn(4, [1, 2, 4]);
shouldBeIn("foo", ["foo" : 1]);

Meta