exceptionhandling

Undocumented in source.

Members

Functions

assertEqual
T assertEqual(T toTest, S toCompareAgainst, string file, int line)
assertGreater
T assertGreater(T toTest, S toCompareAgainst, string file, int line)
assertGreaterEqual
T assertGreaterEqual(T toTest, S toCompareAgainst, string file, int line)
assertLess
T assertLess(T toTest, S toCompareAgainst, string file, int line)
assertLessEqual
T assertLessEqual(T toTest, S toCompareAgainst, string file, int line)
assertNotEqual
T assertNotEqual(T toTest, S toCompareAgainst, string file, int line)

Assert that toTest is equal to toCompareAgainst. If T is a floating point approxEqual is used to compare the values. toTest is returned if the comparision is correct. If the comparision is incorrect an Exception is thrown. If assertEqual is used in a unittest block an AssertError is thrown an Exception otherwise.

assertNotThrown
auto assertNotThrown(T t, int line, string file)
Undocumented in source. Be warned that the author may not have intended to support it.
assertThrown
E assertThrown(T t, int line, string file)
Undocumented in source. Be warned that the author may not have intended to support it.
ensure
auto ref ensure(E exp, Args args)
expect
auto expect(F exp, Args args)

Calls exp if exp does not throw the return value from exp is returned, if exp throws the Exception is cought, a new Exception is constructed with a message made of args space seperated and the previously cought exception is nested in the newly created exception.

Templates

getCMP
template getCMP(T, alias FCMP, alias ICMP)
Undocumented in source.

Meta