|
||||||
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 |
testBasic {}
| |
testClassHierarchy {}
| |
testParameterValue {}
| |
testSubclass {}
|
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 |
::xox::test::TestClassParameterArray instproc testBasic {} { my assertEquals [ ::xox::test::A1 array exists a ] 1 my assertEquals [ ::xox::test::A1 set a(1) ] 1 set a [ ::xox::test::A1 new ] my assert [ Object isobject $a ] my assert [ $a hasclass ::xox::test::A1 ] my assertFalse [ $a exists a(1) ] my assertEquals [ $a a 1 ] 1 $a a 1 2 my assert [ $a exists a ] my assertEquals [ $a a 1 ] 2 }
::xox::test::TestClassParameterArray instproc testClassHierarchy {} { my assertEquals [ ::xox::test::G1 exists data ] 1 my assertEquals [ ::xox::test::G1 set data(1) ] "shared data" my assertNotEquals [ ::xox::test::H1 array exists data ] 1 set h [ ::xox::test::H1 new ] my assert [ Object isobject $h ] my assert [ $h hasclass ::xox::test::H1 ] my assertFalse [ $h array exists data ] my assertEquals [ $h data 1 ] "shared data" catch { $h nodata 1 } result my assertEquals "Could not find nodata in any of ::xox::test::H1 ::xox::test::G1 ::xotcl::Object!" $result }
::xox::test::TestClassParameterArray instproc testParameterValue {} { my assertEquals [ ::xox::test::E1 array exists b ] 1 1 my assertEquals [ ::xox::test::E1 set b(1) ] 2 2 set e [ ::xox::test::E1 new ] my assert [ Object isobject $e ] 3 my assert [ $e hasclass ::xox::test::E1 ] 4 my assertFalse [ $e array exists b ] 5 my assertEquals [ $e b 1 ] 2 6 $e b 1 3 my assert [ $e exists b(1) ] 7 my assertEquals [ $e b 1 ] 3 8 }
::xox::test::TestClassParameterArray instproc testSubclass {} { my assertEquals [ ::xox::test::C1 array exists b ] 1 my assertEquals [ ::xox::test::C1 set b(1) ] 1 set c [ ::xox::test::C1 new ] my assert [ Object isobject $c ] my assert [ $c hasclass ::xox::test::C1 ] my assertFalse [ $c exists b(1) ] my assertEquals [ $c b 1 ] 1 $c b 1 2 my assert [ $c exists b ] my assertEquals [ $c b 1 ] 2 }