Changeset 123
- Timestamp:
- 09/28/11 15:51:40 (8 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
docs/using-mgunit.rst (modified) (1 diff)
-
src/assert.pro (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/using-mgunit.rst
r122 r123 149 149 Sometimes there are tests that are only valid to run in certain circumstances. The `ASSERT` routine can be used to stop a test from counting in the final tally of passes and failures, but using the `SKIP` keyword. For example, if you only want to run a test if running IDL 8.0 or later, put the following at the beginning of the test:: 150 150 151 assert, long( strmid(!version.release, 1, 1)) ge 8, $151 assert, long((strsplit(!version.release, ',', /extract))[0]) ge 8, $ 152 152 'IDL version too old: %s', !version.release, $ 153 153 /skip -
trunk/src/assert.pro
r112 r123 19 19 ; beginning of the test and skip the test if not met:: 20 20 ; 21 ; assert, long( strmid(!version.release, 1, 1)) ge 8, $21 ; assert, long((strsplit(!version.release, ',', /extract))[0]) ge 8, $ 22 22 ; 'IDL version too old: %s', !version.release, $ 23 23 ; /skip
