|
||||||
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 |
testAssert0 {}
| |
testAssert1 {}
| |
testAssertDoNotFindIn {}
| |
testAssertError {}
| |
testAssertErrorFail {}
| |
testAssertExists {}
| |
testAssertExists2 {}
| |
testAssertExistsObject {}
| |
testAssertExistsValue {}
| |
testAssertFindIn {}
| |
testAssertInteger {}
| |
testAssertIntegerInRange {}
| |
testAssertNoErrorFail {}
| |
testAssertObject {}
| |
testAssertObjectInList {}
| |
testAssertValueInList {}
| |
testNoFailure {}
| |
testRegexFail {}
| |
testRegexPositive {}
|
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::TestAssert instproc testAssert0 {} { my assertFailure { my assert 0 {Passed} } }
::xounit::test::TestAssert instproc testAssert1 {} { my assert 1 {Test true} }
::xounit::test::TestAssert instproc testAssertDoNotFindIn {} { my assertDoNotFindIn a b my assertFailure { my assertDoNotFindIn a a } }
::xounit::test::TestAssert instproc testAssertError {} { my assertNoError { set a 1 } "A" my assertError { error a } "B" }
::xounit::test::TestAssert instproc testAssertErrorFail {} { my assertFailure { my assertError { set a Passed } "Passed" } }
::xounit::test::TestAssert instproc testAssertExists {} { my assertFailure { my assertExists someVariable } my assertNotExists someVariable my set someVariable someValue my assertExists someVariable my assertFailure { my assertNotExists someVariable } }
::xounit::test::TestAssert instproc testAssertExists2 {} { set a [ ::xounit::Assert new ] my assertFailure { $a assertExists someVariable } $a assertNotExists someVariable $a set someVariable someValue $a assertExists someVariable my assertFailure { $a assertNotExists someVariable } }
::xounit::test::TestAssert instproc testAssertExistsObject {} { set a [ ::xounit::Assert new ] $a set a 5 $a set o [ Object new ] my assertFailure { $a assertExistsObject a } my assertFailure { $a assertExistsObject b } $a assertExistsObject o }
::xounit::test::TestAssert instproc testAssertExistsValue {} { set a [ ::xounit::Assert new ] my assertFailure { $a assertExistsValue someVariable } $a set someVariable "" my assertFailure { $a assertExistsValue someVariable } $a set someVariable someValue $a assertExistsValue someVariable }
::xounit::test::TestAssert instproc testAssertFindIn {} { set a [ ::xounit::Assert new ] $a assertFindIn a a "Should find a" $a assertFindIn a abcdefgh "Should find a" $a assertFindIn a " abcdefgh" "Should find a" $a assertFindIn TestCasesAreCool "I dont know about you but I think TestCasesAreCool" my assertFailure { $a assertFindIn b a } my assertFailure { $a assertFindIn "" a } }
::xounit::test::TestAssert instproc testAssertInteger {} { my assertInteger 0 my assertInteger -100 my assertInteger 100 my assertFailure { my assertInteger A } my assertFailure { my assertInteger "" } my assertFailure { my assertInteger [ Object new ] } }
::xounit::test::TestAssert instproc testAssertIntegerInRange {} { my assertIntegerInRange 0 0 1 my assertIntegerInRange -100 -1000 0 my assertIntegerInRange 100 0 1000 my assertFailure { my assertIntegerInRange A 0 100 } my assertFailure { my assertIntegerInRange "" 0 100 } my assertFailure { my assertIntegerInRange [ Object new ] 0 100 } my assertFailure { my assertIntegerInRange -1 0 100 } my assertFailure { my assertIntegerInRange 101 0 100 } }
::xounit::test::TestAssert instproc testAssertNoErrorFail {} { my assertFailure { my assertNoError { error Passed } "Passed" } }
::xounit::test::TestAssert instproc testAssertObject {} { my assertObject [ Object new ] set old [ Object new ] $old destroy my assertFailure { my assertObject $old } }
::xounit::test::TestAssert instproc testAssertObjectInList {} { set objects "" set o1 [ ::xotcl::Object new ] set o2 [ ::xotcl::Object new ] my assertFailure { my assertObjectInList $objects $o1 } my assertFailure { my assertObjectInList $objects $o2 } set objects [ list $o1 $o2 ] my assertObjectInList $objects $o1 my assertObjectInList $objects $o2 set objects [ list $o1 ] my assertObjectInList $objects $o1 my assertFailure { my assertObjectInList $objects $o2 } set objects [ list $o2 ] my assertObjectInList $objects $o2 my assertFailure { my assertObjectInList $objects $o1 } }
::xounit::test::TestAssert instproc testAssertValueInList {} { set list "" my assertFailure { my assertValueInList $list A } my assertFailure { my assertValueInList $list B } set list [ list A B ] my assertValueInList $list A my assertValueInList $list B set list [ list A ] my assertValueInList $list A my assertFailure { my assertValueInList $list B } set list [ list B ] my assertValueInList $list B my assertFailure { my assertValueInList $list A } }
::xounit::test::TestAssert instproc testNoFailure {} { my assertNoFailure { } my assertFailure { my assertNoFailure { my fail ack } } }
::xounit::test::TestAssert instproc testRegexFail {} { set a [ ::xounit::Assert new ] catch { $a assertRegex a b my catchAndReport { my fail "\$a assertRegex a b should have failed" } } }
::xounit::test::TestAssert instproc testRegexPositive {} { set a [ ::xounit::Assert new ] $a assertRegex a a $a assertRegex . a set all [ $a assertRegex (!+) !!!!. ] my assertEquals !!!! $all }