Changes between Initial Version and Version 1 of Expect
- Timestamp:
- 02/15/10 01:56:09 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Expect
v1 v1 1 = Expect = 2 3 This is a statement that provides an assertion capability for checking for thrown exceptions. 4 5 Its usually used in unit test code 6 7 == Grammar == 8 {{{ 9 expect EXCEPTIONTYPE 10 BLOCK 11 }}} 12 13 == Examples == 14 {{{ 15 expect FormatException 16 i = Int.parse('abcdefg') 17 18 expect AssertException 19 assert 0 > 1 20 21 ints = [1,2,3] 22 expect ArgumentOutOfRangeException, print ints[5] 23 24 25 expect MyInvalidInputException 26 checkInput(GenericInvalidInputObject) 27 }}} 28 29 == Notes ==