Index: library/lib/test.xotcl =================================================================== diff -u -r4d21376ac1245e34cb5a5f52da893072f311d3a9 -r81c800c8b9cb42ef6743d9b80ac2be5ca211a69a --- library/lib/test.xotcl (.../test.xotcl) (revision 4d21376ac1245e34cb5a5f52da893072f311d3a9) +++ library/lib/test.xotcl (.../test.xotcl) (revision 81c800c8b9cb42ef6743d9b80ac2be5ca211a69a) @@ -4,27 +4,21 @@ namespace eval ::xotcl::test { ::xotcl::use xotcl2 - @ @File {description { - Simple regression test support. - }} + # @file Simple regression test support. - @ Class Test { - description { - Class Test is used to configure test instances, which can - be configured by the following parameters: - <@ul> - <@li>cmd: the command to be executed - <@li>expected: the expected result - <@li>count: number of executions of cmd - <@li>pre: a command to be executed at the begin of the test (before cmd) - <@li>post: a command to be executed after the test (after all cmds) - <@li>namespace in which pre, post and cmd are evaluated; default :: - - The defined tests can be executed by <@tt>Test run - } - } - Class create Test { + # + # Class Test is used to configure test instances, which can + # be configured by the following parameters: + # + # @param cmd the command to be executed + # @param expected the expected result + # @param count number of executions of cmd + # @param pre a command to be executed at the begin of the test (before cmd) + # @param post a command to be executed after the test (after all cmds) + # @param namespace in which pre, post and cmd are evaluated; default "::" + # + # The defined tests can be executed by [:cmd "Test run"] :attribute {name ""} :attribute cmd @@ -59,7 +53,7 @@ foreach o [Object info instances -closure] { if {[info exists pre_exist($o)]} continue #puts "must destroy $o" - if {[::xotcl::is $o object]} {$o destroy} + if {[::next::core::objectproperty $o object]} {$o destroy} } } } @@ -130,6 +124,7 @@ } else { puts stderr "[set :name]:\tincorrect result for '${:msg}'" puts stderr "\texpected: '${:expected}', got '$r' [info exists :errorReport]" + puts stderr "\tin test file [info script]" if {[info exists :errorReport]} {eval [set :errorReport]} exit -1 }