The expression that is expected to not throw the exception.
The file name that the assert failed in. Should be left as default.
The file line that the assert failed in. Should be left as default.
If expression does throw, will throw an UnitTestException.
1 // Makes sure it throws with the message "test" 2 void noThrow(){}; 3 void withThrow(){throw new Exception("test");}; 4 5 // Will throw an exception like "checkit.exception.UnitTestException@test/example.d(7): Expression threw" 6 noThrow.shouldNotThrow();
Used for asserting that a expression will not throw an exception.