|
||||||
SUMMARY: CHILDREN | PARAMETER | INSTPROC | INSTFILTER | INSTFORWARD | DETAIL: | INSTPROC |
::xotcl::Object | +--::xox::Node | +--::xounit::Test | +--::xounit::Assert | +--::xounit::TestCase
Variables | |||
Name | Default Value | Class | Comment |
currentTestMethod |
::xounit::TestCase | name of the currently running test method. |
|
nodeName |
::xox::Node | ||
result |
::xounit::TestCase | the result for the current run. |
Methods | |
Name | Comment |
test {}
| |
testErrorApplication {}
| |
testFailingApplication {}
|
Methods from ::xotcl::Object |
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, garbageCollect, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
|
Instproc Detail |
::xounit::test::TestApplication instproc test {} { set test [ ::xounit::Application new ] $test proc someApplication { } { } $test runApplication someApplication my assertEquals [ llength [ $test results ] ] 0 }
::xounit::test::TestApplication instproc testErrorApplication {} { set test [ ::xounit::Application new ] $test proc someApplication { } { error error } $test runApplication someApplication my assertEquals [ llength [ $test results ] ] 1 set result [ $test results ] my assertFalse [ $result passed ] my assertEquals [ llength [ $result results ] ] 1 set sub [ $result results ] my assertEquals [ $sub info class ] ::xounit::TestError my assertEquals [ lindex [ split [ $sub error ] "\n" ] 0 ] error }
::xounit::test::TestApplication instproc testFailingApplication {} { set test [ ::xounit::Application new ] $test proc someApplication { } { my fail fail } $test runApplication someApplication my assertEquals [ llength [ $test results ] ] 1 set result [ $test results ] my assertFalse [ $result passed ] my assertEquals [ llength [ $result results ] ] 1 set sub [ $result results ] my assertEquals [ $sub info class ] ::xounit::TestFailure my assertEquals [ $sub error ] fail }