- Timestamp:
- 09/28/11 16:54:40 (8 months ago)
- Location:
- trunk/docs
- Files:
-
- 1 added
- 2 modified
-
Makefile (modified) (1 diff)
-
style.css (added)
-
using-mgunit.rst (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/Makefile
r105 r124 285 285 # `<toolname>.FLAGS`. `FLAGS` gives default flags for all tools. 286 286 $(docutils.)FLAGS += $(foreach c,$($(docutils.)CONFIG),--config=$(subst %,$(*D)/,$(findstring %,$(c)))$(subst %,$(*F),$(c))) 287 $(docutils.)RST2HTML.FLAGS += $($(docutils.)FLAGS)287 $(docutils.)RST2HTML.FLAGS += --stylesheet=style.css $($(docutils.)FLAGS) 288 288 $(docutils.)RST2LATEX.FLAGS += $($(docutils.)FLAGS) 289 289 $(docutils.)PEPTOOL.FLAGS += $($(docutils.)FLAGS) -
trunk/docs/using-mgunit.rst
r123 r124 57 57 end 58 58 59 As an example of showing a failing test, the example test case includes a test_fail_examplemethod with an invalid assertion. Also provided is an example of using the `error_is_fail` batch file in the `test_baderror` method. Runtime errors will cause a test to fail, but IO errors normally will not. The `test_baderror` test uses `@error_is_fail` to make an IO error cause the test to fail::59 As an example of showing a failing test, the example test case includes a `test_fail_example` method with an invalid assertion. Also provided is an example of using the `error_is_fail` batch file in the `test_baderror` method. Runtime errors will cause a test to fail, but IO errors normally will not. The `test_baderror` test uses `@error_is_fail` to make an IO error cause the test to fail:: 60 60 61 61 function findgen_ut::test_baderror … … 108 108 Results: 4 / 10 tests passed 109 109 110 Alternatively, test cases may be grouped into test suites. Test suites are just collections of test cases. To make a suite, subclass `MGutTestSuite` and use the add method in the the subclass' initmethod to add test classes. For example, to make a suite containing the `indgen_ut` and `findgen_ut` test cases::110 Alternatively, test cases may be grouped into test suites. Test suites are just collections of test cases. To make a suite, subclass `MGutTestSuite` and use the `add` method in the the subclass' `init` method to add test classes. For example, to make a suite containing the `indgen_ut` and `findgen_ut` test cases:: 111 111 112 112 function indgen_uts::init, _extra=e … … 171 171 ------------- 172 172 173 Templates for the IDL Workbench are provided to make test/suite creation even faster. To use them, first navigate to the Workbench preferences. There should be a Templates section under the IDL heading. Click the "Import" button on the right and navigate to the `test-templates.xml` file in the mgunit source. Two new templates, "Test case" and "Test suite", should now be available. Typing "testcase" into a new file and then selecting Edit > Content Assistfrom the menus will create a test case which can be filled out like a form. Suites can be created the same way by typing "testsuite".173 Templates for the IDL Workbench are provided to make test/suite creation even faster. To use them, first navigate to the Workbench preferences. There should be a Templates section under the IDL heading. Click the "Import" button on the right and navigate to the `test-templates.xml` file in the mgunit source. Two new templates, "Test case" and "Test suite", should now be available. Typing "testcase" into a new file and then selecting *Edit > Content Assist* from the menus will create a test case which can be filled out like a form. Suites can be created the same way by typing "testsuite". 174 174 175 175
