Changeset 107

Show
Ignore:
Timestamp:
01/25/11 22:04:21 (16 months ago)
Author:
mgalloy
Message:

Docs. Cleaning up XML test runner.

Location:
trunk
Files:
8 modified
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11.project 
        22api-docs 
         3api-userdocs 
  • trunk/Makefile

    r106 r107  
    44IDL=idl 
    55 
    6 .PHONY: all doc clean dist srcdist 
     6.PHONY: all doc userdoc webdoc clean dist srcdist 
    77  
    88all: 
     
    1111doc: 
    1212        idl -e mgunit_build_docs 
     13 
     14userdoc: 
     15        idl -e mgunit_build_userdocs 
     16 
     17webdoc: 
     18        idl -e mgunit_build_userdocs 
     19        scp -r api-userdocs/* idldev.com:~/docs.idldev.com/mgunit 
    1320 
    1421clean: 
  • trunk/mgunit_build_userdocs.pro

    r82 r107  
    44; Build mgunit docs. 
    55;- 
    6 pro mgunit_build_docs 
     6pro mgunit_build_userdocs 
    77  compile_opt strictarr 
    88   
     
    1010 
    1111  idldoc, root=filepath('', subdir='src', root=root), $ 
    12           output=filepath('', subdir='api-docs', root=root), $ 
     12          output=filepath('', subdir='api-userdocs', root=root), $ 
    1313          /nosource, $ 
    1414          title='MGunit documentation', subtitle='Unit testing for IDL', $ 
    15           /embed 
     15          /embed, /user 
    1616end 
  • trunk/src/mgunit.pro

    r106 r107  
    4949;       number of tests that were skipped 
    5050;    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 
    5254;- 
    5355pro mgunit, tests, filename=filename, html=html, xml=xml, gui=gui, junit=junit, $ 
  • trunk/src/mgutguirunner__define.pro

    r104 r107  
    77 
    88 
     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;- 
    916pro mgutguirunner_event, event 
    1017  compile_opt strictarr 
     
    1522 
    1623 
     24;+ 
     25; Widget cleanup routine. 
     26; 
     27; :Params: 
     28;    tlb : in, required, type=long 
     29;       top-level widget identifier 
     30;- 
    1731pro mgutguirunner_cleanup, tlb 
    1832  compile_opt strictarr 
     
    181195 
    182196 
     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;- 
    183210pro mgutguirunner::_print, text, continued=continued, _extra=e 
    184211  compile_opt strictarr 
     
    287314 
    288315 
     316;+ 
     317; Widget cleanup routine. 
     318;- 
    289319pro mgutguirunner::_cleanupWidgets 
    290320  compile_opt strictarr 
  • trunk/src/mgutjunitrunner__define.pro

    r104 r107  
    196196;       keywords to MG_ANSICODE i.e. RED or GREEN 
    197197;- 
    198 pro mgutjunitrunner::_print, lun, text, level=level, _extra=e 
     198pro mgutjunitrunner::_print, lun, text, _extra=e 
    199199  compile_opt strictarr 
    200200   
  • trunk/src/mguttestcase__define.pro

    r106 r107  
    137137 
    138138 
     139;+ 
     140; Display test results via test runner methods. 
     141;- 
    139142pro mguttestcase::display 
    140143  compile_opt strictarr 
     
    327330  compile_opt strictarr 
    328331 
    329   ptr_free, self.testnames 
     332  ptr_free, self.testnames, self.logmsgs, self.passes 
    330333end 
    331334 
     
    340343;    test_runner : in, required, type=object 
    341344;       subclass of `MGutTestRunner` 
     345;    failures_only : in, optional, type=boolean 
     346;       set to report only failed tests 
    342347;- 
    343348function mguttestcase::init, test_runner=testRunner, failures_only=failuresOnly 
     
    370375;    testnames  
    371376;       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 
    372381;    level  
    373382;       number of layers down from the top-containing suite 
     
    380389;    time 
    381390;       time for the current test to run 
     391;    failuresOnly 
     392;       flag to indicate only failed tests should be reported 
    382393;- 
    383394pro mguttestcase__define 
  • trunk/src/mguttestsuite__define.pro

    r106 r107  
    1111; Recompile the class definition before creating the object to make sure it is 
    1212; 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 
    1317;- 
    1418pro mguttestsuite::_recompile, classname 
     
    7882 
    7983 
     84;+ 
     85; Display test results via test runner methods. 
     86;- 
    8087pro mguttestsuite::display 
    8188  compile_opt strictarr 
     
    306313;    test_runner : in, required, type=object 
    307314;       subclass of MGtestRunner 
     315;    failures_only : in, optional, type=boolean 
     316;       set to report only failed tests 
    308317;- 
    309318function mguttestsuite::init, name=name, home=home, test_runner=testRunner, $ 
     
    359368;       number of skipped tests contained in the hierarchy below this test  
    360369;       suite 
     370;    failuresOnly 
     371;       flag to indicate only failed tests should be reported 
    361372;- 
    362373pro mguttestsuite__define 
  • trunk/src/mgutxmlrunner__define.pro

    r104 r107  
    134134;    passed : in, required, type=boolean 
    135135;       whether the test passed 
     136;    skipped : in, required, type=boolean 
     137;       indicates whether the test should be counted in the results 
    136138;    time : in, required, type=float 
    137139;       time for the test to run 
     
    139141;       level of test case 
    140142;- 
    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 
     143pro 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 
    150159   
    151160  self->_print, self.lun, string(indent, format='(%"%s  </test>")') 
     
    166175;       keywords to `MG_ANSICODE`, i.e., `RED` or `GREEN` 
    167176;- 
    168 pro mgutxmlrunner::_print, lun, text, level=level, _extra=e 
     177pro mgutxmlrunner::_print, lun, text, _extra=e 
    169178  compile_opt strictarr 
    170179