shouldBeIn

* Verify that the value is in the container. * Throws: UnitTestException on failure

  1. void shouldBeIn(T value, U container, string file, size_t line)
    void
    shouldBeIn
    (
    T
    U
    )
    (
    const auto ref T value
    ,
    const auto ref U container
    ,
    string file = __FILE__
    ,
    size_t line = __LINE__
    )
  2. void shouldBeIn(T value, U container, string file, size_t line)

Examples

5.shouldBeIn([5: "foo"]);

struct AA {
    int onlyKey;
    bool opBinaryRight(string op)(in int key) const {
        return key == onlyKey;
    }
}

5.shouldBeIn(AA(5));

Meta