./
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 a MGutTestSuite and use the add method to add test suites/cases.
Class description for mguttestsuite
Properties
- home init
- npass get
- nfail get
- name get init
- ntestcases get
- test_runner init
- ntests get
Fields
- home ''
directory (with trailing slash) containing the source code for this test suite
- testcases obj_new()
IDL_Container holding test suites or test cases
- npass 0L
number of passing tests contained in the hierarchy below this test suite
- nfail 0L
number of failing tests contained in the hierarchy below this test suite
- name ''
name of the object
- testRunner obj_new()
subclass of MGutTestRunner
- level 0L
number of layers below the top-most containing test suite
Routines
mguttestsuite::_recompile, classname
Recompile the class definition before creating the object to make sure it is the newest definition (convenient when making changes to a test).
result = mguttestsuite::_makeTestCase(testName [, /error] [, _extra=keywords])
Create a new test case or test suite, but check for errors while creating it.
mguttestsuite::recompileTestCases
Recompiles all test cases contained by the suite or contained by child suites.
mguttestsuite::run
Run the contained test suites or test cases.
mguttestsuite::add, tests [, /all]
Add a scalar or array of test suites or test cases.
mguttestsuite::getProperty [, name=string] [, npass=integer] [, nfail=integer] [, ntestcases=integer] [, ntests=integer]
Get properties of the object.
mguttestsuite::setLevel, level
Test suites can contain other test suites or test cases.
mguttestsuite::cleanup
Free resources.
result = mguttestsuite::init( [name=string] [, home=string], test_runner=object)
Initialize test suite.
mguttestsuite__define
Define member variables.
Routine details
topmguttestsuite::_recompile
mguttestsuite::_recompile, classname
Recompile the class definition before creating the object to make sure it is the newest definition (convenient when making changes to a test).
Parameters
- classname
topmguttestsuite::_makeTestCase
result = mguttestsuite::_makeTestCase(testName [, /error] [, _extra=keywords])
Create a new test case or test suite, but check for errors while creating it.
Return value
obj
Parameters
- testName in required type=string
classname of test case or test suite to create
Keywords
- error out optional type=boolean
0 if no error and 1 if an error
- _extra in optional type=keywords
keywords to OBJ_NEW for test cases and test suites
topmguttestsuite::recompileTestCases
mguttestsuite::recompileTestCases
Recompiles all test cases contained by the suite or contained by child suites.
topmguttestsuite::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 calls this method is located)
topmguttestsuite::getProperty
mguttestsuite::getProperty [, name=string] [, npass=integer] [, nfail=integer] [, ntestcases=integer] [, ntests=integer]
Get properties of the object.
Keywords
- name out optional type=string
name of the object
- npass out optional type=integer
number of passing tests contained in the hierarchy below this object
- nfail out optional type=integer
number of failing tests contained in the hierarchy below this object
- ntestcases out optional type=integer
number of directly contained test suites or test cases
- ntests out optional type=integer
number of tests contained in the hierarchy below this object
topmguttestsuite::setLevel
mguttestsuite::setLevel, level
Test suites can contain other test suites or test cases. The level is the number of layers down from the top most test suite (level 0).
Parameters
- level in required type=integer
new level of object
topmguttestsuite::init
result = mguttestsuite::init( [name=string] [, home=string], test_runner=object)
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 default=''
location of the root of the test suite
- test_runner in required type=object
subclass of MGtestRunner
File attributes
Modification date: | Wed Apr 22 23:28:57 2009 |
Lines: | 332 |
Docformat: | rst rst |