Changeset 76
- Timestamp:
- 07/14/09 12:24:38 (3 years ago)
- Location:
- trunk/mgunit
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/mgunit/Makefile
r73 r76 1 VERSION=1. 0.01 VERSION=1.1dev 2 2 REVISION=r`svn info | sed -n 's/Revision: \(.*\)/\1/p'` 3 3 RELEASE="$(VERSION)-$(REVISION)" -
trunk/mgunit/RELEASE
r60 r76 3 3 ------------- 4 4 5 mgunit 1.1 6 ---------- 7 8 * Added an extra argument to ASSERT which can be inserted into msg via C-style 9 format codes. 10 11 5 12 mgunit 1.0 6 13 ---------- -
trunk/mgunit/src/assert.pro
r17 r76 13 13 ; msg : in, optional, type=string, default="Assertion failed" 14 14 ; message to throw if condition is not met 15 ; arg : in, optional, type=string 16 ; argument for any C format codes in msg 15 17 ;- 16 pro assert, condition, msg 18 pro assert, condition, msg, arg 17 19 compile_opt strictarr, logical_predicate, hidden 18 20 on_error, 2 19 21 20 if (~condition) then message, n_elements(msg) eq 0 ? 'Assertion failed' : msg 22 case n_params() of 23 0: 24 1: if (~condition) then message, 'Assertion failed' 25 2: if (~condition) then message, msg 26 3: if (~condition) then message, string(arg, format='(%"' + msg + '")') 27 endcase 21 28 end
