- Timestamp:
- 10/17/11 14:54:04 (7 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
docs/using-mgunit.rst (modified) (2 diffs)
-
Makefile (modified) (1 diff)
-
src/mguttestcase__define.pro (modified) (1 diff)
-
src/mguttestsuite__define.pro (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/using-mgunit.rst
r124 r125 68 68 end 69 69 70 Running allthe test case now results in the following::70 Running the test case now results in the following:: 71 71 72 72 IDL> mgunit, 'findgen_ut' … … 81 81 82 82 Both test failures above are expected and present only to demonstrate features of mgunit. 83 84 A single test method of a test case can be run using a `.` to separate the test class name from the method name:: 85 86 IDL> mgunit, 'findgen_ut.test_basic' 87 "All tests" test suite starting (1 test suite/case, 1 test) 88 "findgen_ut" test case starting (1 test) 89 test_basic: passed (0.000078 seconds) 90 Results: 1 / 1 tests passed, 0 skipped 91 Results: 1 / 1 tests passed, 0 skipped 83 92 84 93 -
trunk/Makefile
r119 r125 1 VERSION=1. 21 VERSION=1.3dev 2 2 REVISION=r`svn info | sed -n 's/Revision: \(.*\)/\1/p'` 3 3 RELEASE="$(VERSION)-$(REVISION)" -
trunk/src/mguttestcase__define.pro
r112 r125 343 343 ntests = self.ntests 344 344 if (arg_present(testnames)) then testnames = *self.testnames 345 end 346 347 348 ;+ 349 ; Set properties of the object. 350 ;- 351 pro mguttestcase::setProperty, testnames=testnames 352 compile_opt strictarr 353 354 if (n_elements(testnames) gt 0L) then begin 355 *self.testnames = strlowcase(testnames) 356 self.ntests = n_elements(testnames) 357 endif 345 358 end 346 359 -
trunk/src/mguttestsuite__define.pro
r112 r125 266 266 endif else begin 267 267 for t = 0L, n_elements(tests) - 1L do begin 268 dotpos = strpos(tests[t], '.') 269 if (dotpos eq -1L) then begin 270 classname = tests[t] 271 endif else begin 272 classname = strmid(tests[t], 0, dotpos) 273 methodname = strmid(tests[t], dotpos + 1L) 274 endelse 275 268 276 ; don't add yourself to yourself 269 if ( tests[t]eq self.name) then continue277 if (classname eq self.name) then continue 270 278 271 279 ; see if test is valid 272 otestcase = self->_makeTestCase( tests[t], error=error)280 otestcase = self->_makeTestCase(classname, error=error) 273 281 if (error ne 0L) then begin 274 print, 'Error creating ' + tests[t]+ ' object: ' + !error_state.msg282 print, 'Error creating ' + classname + ' object: ' + !error_state.msg 275 283 continue 276 284 endif … … 278 286 ; test case is OK so now set it up 279 287 otestcase->setLevel, self.level + 1L 288 if (n_elements(methodname) gt 0L) then begin 289 otestcase->setProperty, testnames=[methodname] 290 endif 280 291 self.testcases->add, otestcase 281 292 endfor
