Changeset 123

Show
Ignore:
Timestamp:
09/28/11 15:51:40 (8 months ago)
Author:
mgalloy
Message:

Updating SKIP example for ASSERT.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/docs/using-mgunit.rst

    r122 r123  
    149149Sometimes 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:: 
    150150 
    151   assert, long(strmid(!version.release, 1, 1)) ge 8, $ 
     151  assert, long((strsplit(!version.release, ',', /extract))[0]) ge 8, $ 
    152152          'IDL version too old: %s', !version.release, $ 
    153153          /skip 
  • trunk/src/assert.pro

    r112 r123  
    1919;    beginning of the test and skip the test if not met:: 
    2020; 
    21 ;       assert, long(strmid(!version.release, 1, 1)) ge 8, $ 
     21;       assert, long((strsplit(!version.release, ',', /extract))[0]) ge 8, $ 
    2222;               'IDL version too old: %s', !version.release, $ 
    2323;               /skip