UnitTestException on failure
auto arrayRangeWithoutLength(T)(T[] array) { struct ArrayRangeWithoutLength(T) { private: T[] array; public: T front() const @property { return array[0]; } void popFront() { array = array[1 .. $]; } bool empty() const @property { return array.empty; } } return ArrayRangeWithoutLength!T(array); } shouldNotBeIn(3.5, [1.1, 2.2, 4.4]); shouldNotBeIn(1.0, [2.0 : 1, 3.0 : 2]); shouldNotBeIn(1, arrayRangeWithoutLength([2, 3, 4]));
Verify that the value is not in the container.