Changeset 114

Show
Ignore:
Timestamp:
02/18/11 18:31:57 (15 months ago)
Author:
mgalloy
Message:

Improving docs, reporting version.

Location:
trunk
Files:
1 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r107 r114  
    1 VERSION=1.2dev 
     1VERSION=1.2alpha 
    22REVISION=r`svn info | sed -n 's/Revision: \(.*\)/\1/p'` 
    33RELEASE="$(VERSION)-$(REVISION)" 
    44IDL=idl 
    55 
    6 .PHONY: all doc userdoc webdoc clean dist srcdist 
     6.PHONY: all doc userdoc webdoc clean dist srcdist version 
    77  
    88all: 
     
    2323        cd src; make clean 
    2424 
     25version: 
     26        sed "s/version = '.*'/version = '$(VERSION)'/" < src/mgunit_version.pro | sed "s/revision = '.*'/revision = '$(REVISION)'/" > mgunit_version.pro 
     27        mv mgunit_version.pro src/ 
     28 
    2529# need to: blow away old dist, blow away api-docs, generate api-docs 
    2630dist: 
    2731        rm -rf mgunit-$(RELEASE) 
    28         rm -rf api-docs/ 
     32        rm -rf api-userdocs/ 
    2933 
    30         $(IDL) -e mgunit_build_docs 
    31          
     34        make version 
     35 
     36        $(IDL) -e mgunit_build_userdocs 
     37 
    3238        $(IDL) -IDL_STARTUP "" mgunit_build 
    3339 
     
    3541 
    3642        mv mgunit.sav mgunit-$(RELEASE)/ 
     43 
     44        cd docs; make 
    3745        svn export docs mgunit-$(RELEASE)/docs/ 
    38         cp -r api-docs mgunit-$(RELEASE)/ 
     46        cp docs/using-mgunit.pdf mgunit-$(RELEASE)/docs/ 
     47        cp docs/using-mgunit.html mgunit-$(RELEASE)/docs/ 
     48        rm mgunit-$(RELEASE)/docs/Makefile 
     49 
     50        cp -r api-userdocs mgunit-$(RELEASE)/ 
    3951        cp src/error_is_fail.pro mgunit-$(RELEASE)/ 
    4052        cp src/error_is_pass.pro mgunit-$(RELEASE)/ 
     
    4355        cp COPYING mgunit-$(RELEASE)/ 
    4456        cp RELEASE mgunit-$(RELEASE)/    
    45          
     57 
    4658        zip -r mgunit-$(RELEASE).zip mgunit-$(RELEASE)/* 
    4759        rm -rf mgunit-$(RELEASE) 
     
    6880        cp COPYING mgunit-src-$(RELEASE)/ 
    6981        cp RELEASE mgunit-src-$(RELEASE)/        
    70          
     82 
    7183        zip -r mgunit-src-$(RELEASE).zip mgunit-src-$(RELEASE)/* 
    7284        rm -rf mgunit-src-$(RELEASE) 
    73          
  • trunk/mgunit_build_docs.pro

    r110 r114  
    1313          overview='overview.txt', $ 
    1414          /nosource, $ 
    15           title='MGunit documentation', subtitle='Unit testing for IDL', $ 
     15          title=string(mgunit_version(), format='(%"mgunit %s API documentation")'), $ 
     16          subtitle='Unit testing framework for IDL', $ 
    1617          /embed, format_style='rst', markup_style='rst' 
    1718end 
  • trunk/mgunit_build_userdocs.pro

    r110 r114  
    1313          overview='overview.txt', $ 
    1414          /nosource, $ 
    15           title='MGunit documentation', subtitle='Unit testing for IDL', $ 
     15          title=string(mgunit_version(), format='(%"mgunit %s API documentation")'), $ 
     16          subtitle='Unit testing framework for IDL', $ 
    1617          /embed, /user, format_style='rst', markup_style='rst' 
    1718end 
  • trunk/overview.txt

    r113 r114  
    11`mgunit` is a unit testing framework modeled on other `xUnit testing frameworks <http://en.wikipedia.org/wiki/XUnit>`. The goal is to allow easy creation and reporting of results of tests, while still allowing for many different testing situations. Simple naming conventions replace formal creation of hierarchies and specification of tests. This allows test suites to be created with a minimum of code beyond the actual code of the tests themselves. 
     2 
     3The basic structure of `mgunit` is that tests are created by subclassing `MGutTestCase`, tests can be grouped together into suites for convenience by subclassing `MGutTestSuite`, and tests are run my calling `mgunit`. The `assert` routine is useful inside a test for making an assertion during the test. The `error_is_pass.pro` batch file is useful to include in a test when the test is supposed to crash.  
    24 
    35See "Using mgunit" in the `docs` directory for more details about using `mgunit`. 
    46 
    5 The basic structure of `mgunit` is that tests are created by subclassing `MGutTestCase`, tests can be grouped together into suites for convenience by subclassing `MGutTestSuite`, and tests are run my calling `mgunit`. The `assert` routine is useful inside a test for making an assertion during the test. The `error_is_pass.pro` batch file is useful to include in a test when the test is supposed to crash.  
    67 
    78:Author: 
  • trunk/RELEASE

    r106 r114  
    77 
    88* Added FAILURES_ONLY keyword to display only failured tests. 
     9 
     10* Simplified and improved user-level API documentation. 
     11 
     12* Added `VERSION` keyword to report mgunit version. 
    913 
    1014 
  • trunk/src/mgunit.pro

    r112 r114  
    3232;       IDL> mgunit, ['test1_ut', 'test2_ut'] 
    3333; 
    34 ;    Or one could be run individually like:: 
     34;    Or one test could be run individually like:: 
    3535; 
    3636;       IDL> mgunit, 'test1_ut' 
     
    6464;    failures_only : in, optional, type=boolean 
    6565;       report only failed tests 
     66;    version : in, optional, type=boolean 
     67;       set to report version and exit 
    6668;- 
    6769pro mgunit, tests, filename=filename, html=html, xml=xml, gui=gui, junit=junit, $ 
    6870            color=color, $ 
    6971            npass=npass, nfail=nfail, nskip=nskip, ntests=ntests, $ 
    70             failures_only=failuresOnly 
     72            failures_only=failuresOnly, version=version 
    7173  compile_opt strictarr 
     74 
     75  if (keyword_set(version)) then begin 
     76    print, string(mgunit_version(/full), format='(%"mgunit %s")') 
     77    return 
     78  endif 
    7279 
    7380  case 1 of