shouldNotBeIn

Verify that the value is not in the container.

  1. void shouldNotBeIn(in auto ref T value, in auto ref U container, in string file = __FILE__, in size_t line = __LINE__)
    void
    shouldNotBeIn
    (
    T
    U
    )
    (
    in auto ref T value
    ,
    in auto ref U container
    ,
    in string file = __FILE__
    ,
    in size_t line = __LINE__
    )
    if (
    isLikeAssociativeArray!(U, T)
    )
  2. void shouldNotBeIn(in auto ref T value, U container, in string file = __FILE__, in size_t line = __LINE__)

Throws

UnitTestException on failure

Examples

1 5.shouldNotBeIn([4: "foo"]);
2 
3 struct AA {
4     int onlyKey;
5     bool opBinaryRight(string op)(in int key) const {
6         return key == onlyKey;
7     }
8 }
9 
10 5.shouldNotBeIn(AA(4));
11 assertFail(5.shouldNotBeIn(AA(5)));

Meta