./
mguttestsuite__define.pro
Test suites are containers for test cases. Either subclass MGutTestSuite
and add test suites/test cases in its init
method or create an
MGutTestSuite
and use the add
method to add test suites/cases.
For example, it is typical do create a test suite like the following:
function mytestsuite_uts::init, _extra=e
compile_opt strictarr
if (~self->MGutTestSuite::init(_strict_extra=e)) then return, 0
self->add, /all
return, 1
end
pro mytestsuite_uts__define
compile_opt strictarr
define = { MyTestSuite_uts, inherits MGutTestSuite }
end
IDL> mgunit, 'mytestsuite_uts'
Class description for mguttestsuite
Properties
- home init type=string
location of the root of the test suite
- npass get type=integer
number of passing tests contained in the hierarchy below this object
- nfail get type=integer
number of failing tests contained in the hierarchy below this object
- name get init type=string
name of the object
- ntestcases get type=integer
number of directly contained test suites or test cases
- failures_only init type=boolean
set to report only failed tests
- nskip get type=integer
number of skipped tests contained in the hierarchy below this object
- test_runner init type=object
subclass of
MGtestRunner
- ntests get type=integer
number of tests contained in the hierarchy below this object
Routines
mguttestsuite::add, tests [, /all]
Add a scalar or array of test suites or test cases.
mguttestsuite::getProperty, name=string, npass=integer, nfail=integer, nskip=integer, ntestcases=integer, ntests=integer
Get properties of the object.
mguttestsuite::cleanup
Free resources.
result = mguttestsuite::init( [name=string] [, home=string], test_runner=object, /failures_only)
Initialize test suite.
mguttestsuite__define
Define member variables.
Routine details
top mguttestsuite::add
mguttestsuite::add, tests [, /all]
Add a scalar or array of test suites or test cases.
Parameters
- tests in required type=strarr
classnames of test suites or test cases
Keywords
- all in optional type=boolean
set to add all the files in the current directory that end in "_ut__define.pro" (the current directory is defined to be the directory where the method calling this method is located)
top mguttestsuite::getProperty
mguttestsuite::getProperty, name=string, npass=integer, nfail=integer, nskip=integer, ntestcases=integer, ntests=integer
Get properties of the object.
Keywords
- name type=string
name of the object
- npass type=integer
number of passing tests contained in the hierarchy below this object
- nfail type=integer
number of failing tests contained in the hierarchy below this object
- nskip type=integer
number of skipped tests contained in the hierarchy below this object
- ntestcases type=integer
number of directly contained test suites or test cases
- ntests type=integer
number of tests contained in the hierarchy below this object
top mguttestsuite::init
result = mguttestsuite::init( [name=string] [, home=string], test_runner=object, /failures_only)
Initialize test suite.
Return value
1 for success, 0 for failure
Keywords
- name in optional type=string default=classname
name of the test suite
- home in optional type=string
location of the root of the test suite
- test_runner type=object
subclass of
MGtestRunner
- failures_only type=boolean
set to report only failed tests
File attributes
Modification date: | Mon Oct 17 15:44:19 2011 |
Lines: | 438 |
Docformat: | rst rst |