shouldBeEmpty

Verify that aa is empty.

  1. void shouldBeEmpty(R rng, string file, size_t line)
  2. void shouldBeEmpty(shared(R) rng, string file, size_t line)
  3. void shouldBeEmpty(T aa, string file, size_t line)
    void
    shouldBeEmpty
    (
    T
    )
    (
    auto ref T aa
    ,
    string file = __FILE__
    ,
    size_t line = __LINE__
    )
    if (
    isAssociativeArray!T
    )

Throws

UnitTestException on failure.

Examples

int[] ints;
string[] strings;
string[string] aa;

shouldBeEmpty(ints);
shouldBeEmpty(strings);
shouldBeEmpty(aa);

ints ~= 1;
strings ~= "foo";
aa["foo"] = "bar";

Meta