Changeset 107
- Timestamp:
- 01/25/11 22:04:21 (16 months ago)
- Location:
- trunk
- Files:
-
- 8 modified
- 1 copied
-
. (modified) (1 prop)
-
Makefile (modified) (2 diffs)
-
mgunit_build_userdocs.pro (copied) (copied from trunk/mgunit_build_docs.pro) (2 diffs)
-
src/mgunit.pro (modified) (1 diff)
-
src/mgutguirunner__define.pro (modified) (4 diffs)
-
src/mgutjunitrunner__define.pro (modified) (1 diff)
-
src/mguttestcase__define.pro (modified) (5 diffs)
-
src/mguttestsuite__define.pro (modified) (4 diffs)
-
src/mgutxmlrunner__define.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 .project 2 2 api-docs 3 api-userdocs
-
- Property svn:ignore
-
trunk/Makefile
r106 r107 4 4 IDL=idl 5 5 6 .PHONY: all doc clean dist srcdist6 .PHONY: all doc userdoc webdoc clean dist srcdist 7 7 8 8 all: … … 11 11 doc: 12 12 idl -e mgunit_build_docs 13 14 userdoc: 15 idl -e mgunit_build_userdocs 16 17 webdoc: 18 idl -e mgunit_build_userdocs 19 scp -r api-userdocs/* idldev.com:~/docs.idldev.com/mgunit 13 20 14 21 clean: -
trunk/mgunit_build_userdocs.pro
r82 r107 4 4 ; Build mgunit docs. 5 5 ;- 6 pro mgunit_build_ docs6 pro mgunit_build_userdocs 7 7 compile_opt strictarr 8 8 … … 10 10 11 11 idldoc, root=filepath('', subdir='src', root=root), $ 12 output=filepath('', subdir='api- docs', root=root), $12 output=filepath('', subdir='api-userdocs', root=root), $ 13 13 /nosource, $ 14 14 title='MGunit documentation', subtitle='Unit testing for IDL', $ 15 /embed 15 /embed, /user 16 16 end -
trunk/src/mgunit.pro
r106 r107 49 49 ; number of tests that were skipped 50 50 ; ntests : out, optional, type=long 51 ; number of tests 51 ; number of tests 52 ; failures_only : in, optional, type=boolean 53 ; report only failed tests 52 54 ;- 53 55 pro mgunit, tests, filename=filename, html=html, xml=xml, gui=gui, junit=junit, $ -
trunk/src/mgutguirunner__define.pro
r104 r107 7 7 8 8 9 ;+ 10 ; Event handler for GUI runner. 11 ; 12 ; :Params: 13 ; event : in, required, type=event structure 14 ; event structure for any event generated by GUI runner 15 ;- 9 16 pro mgutguirunner_event, event 10 17 compile_opt strictarr … … 15 22 16 23 24 ;+ 25 ; Widget cleanup routine. 26 ; 27 ; :Params: 28 ; tlb : in, required, type=long 29 ; top-level widget identifier 30 ;- 17 31 pro mgutguirunner_cleanup, tlb 18 32 compile_opt strictarr … … 181 195 182 196 197 ;+ 198 ; Routine to display the results of a test. 199 ; 200 ; :Params: 201 ; text : in, required, type=string 202 ; message to display 203 ; 204 ; :Keywords: 205 ; continued : in, optional, type=boolean 206 ; set to indicate that the text is not finished 207 ; _extra : in, optional, type=keywords 208 ; extra keywords present for compatibility with other runners 209 ;- 183 210 pro mgutguirunner::_print, text, continued=continued, _extra=e 184 211 compile_opt strictarr … … 287 314 288 315 316 ;+ 317 ; Widget cleanup routine. 318 ;- 289 319 pro mgutguirunner::_cleanupWidgets 290 320 compile_opt strictarr -
trunk/src/mgutjunitrunner__define.pro
r104 r107 196 196 ; keywords to MG_ANSICODE i.e. RED or GREEN 197 197 ;- 198 pro mgutjunitrunner::_print, lun, text, level=level,_extra=e198 pro mgutjunitrunner::_print, lun, text, _extra=e 199 199 compile_opt strictarr 200 200 -
trunk/src/mguttestcase__define.pro
r106 r107 137 137 138 138 139 ;+ 140 ; Display test results via test runner methods. 141 ;- 139 142 pro mguttestcase::display 140 143 compile_opt strictarr … … 327 330 compile_opt strictarr 328 331 329 ptr_free, self.testnames 332 ptr_free, self.testnames, self.logmsgs, self.passes 330 333 end 331 334 … … 340 343 ; test_runner : in, required, type=object 341 344 ; subclass of `MGutTestRunner` 345 ; failures_only : in, optional, type=boolean 346 ; set to report only failed tests 342 347 ;- 343 348 function mguttestcase::init, test_runner=testRunner, failures_only=failuresOnly … … 370 375 ; testnames 371 376 ; pointer to string array of method names that start with "test" 377 ; logmsgs 378 ; pointer to string array of log message for each test 379 ; passes 380 ; point to byte array of pass/fail status for each test 372 381 ; level 373 382 ; number of layers down from the top-containing suite … … 380 389 ; time 381 390 ; time for the current test to run 391 ; failuresOnly 392 ; flag to indicate only failed tests should be reported 382 393 ;- 383 394 pro mguttestcase__define -
trunk/src/mguttestsuite__define.pro
r106 r107 11 11 ; Recompile the class definition before creating the object to make sure it is 12 12 ; the newest definition (convenient when making changes to a test). 13 ; 14 ; :Params: 15 ; classname : in, required, type=string 16 ; classname of class to recompile 13 17 ;- 14 18 pro mguttestsuite::_recompile, classname … … 78 82 79 83 84 ;+ 85 ; Display test results via test runner methods. 86 ;- 80 87 pro mguttestsuite::display 81 88 compile_opt strictarr … … 306 313 ; test_runner : in, required, type=object 307 314 ; subclass of MGtestRunner 315 ; failures_only : in, optional, type=boolean 316 ; set to report only failed tests 308 317 ;- 309 318 function mguttestsuite::init, name=name, home=home, test_runner=testRunner, $ … … 359 368 ; number of skipped tests contained in the hierarchy below this test 360 369 ; suite 370 ; failuresOnly 371 ; flag to indicate only failed tests should be reported 361 372 ;- 362 373 pro mguttestsuite__define -
trunk/src/mgutxmlrunner__define.pro
r104 r107 134 134 ; passed : in, required, type=boolean 135 135 ; whether the test passed 136 ; skipped : in, required, type=boolean 137 ; indicates whether the test should be counted in the results 136 138 ; time : in, required, type=float 137 139 ; time for the test to run … … 139 141 ; level of test case 140 142 ;- 141 pro mgutxmlrunner::reportTestResult, msg, passed=passed, time=time, level=level 142 compile_opt strictarr 143 144 indent = level eq 0L ? '' : string(bytarr(2 * level) + 32B) 145 146 if (~keyword_set(passed)) then begin 147 _msg = string(indent, msg, format='(%"%s <failure>%s</failure>")') 148 self->_print, self.lun, _msg 149 endif 143 pro mgutxmlrunner::reportTestResult, msg, passed=passed, skipped=skipped, $ 144 time=time, level=level 145 compile_opt strictarr 146 147 indent = level eq 0L ? '' : string(bytarr(2 * level) + 32B) 148 149 case 1 of 150 keyword_set(skipped): begin 151 _msg = string(indent, msg, format='(%"%s <skipped>%s</skipped>")') 152 self->_print, self.lun, _msg 153 end 154 ~keyword_set(passed): begin 155 _msg = string(indent, msg, format='(%"%s <failure>%s</failure>")') 156 self->_print, self.lun, _msg 157 end 158 endcase 150 159 151 160 self->_print, self.lun, string(indent, format='(%"%s </test>")') … … 166 175 ; keywords to `MG_ANSICODE`, i.e., `RED` or `GREEN` 167 176 ;- 168 pro mgutxmlrunner::_print, lun, text, level=level,_extra=e177 pro mgutxmlrunner::_print, lun, text, _extra=e 169 178 compile_opt strictarr 170 179
