Index: tests/object-system.test =================================================================== diff -u -r52a0f3588723b74acd74a83be339c80b5b4a6701 -rc6057c18970d5bc19fe0f1f760ef0d29898ecfdd --- tests/object-system.test (.../object-system.test) (revision 52a0f3588723b74acd74a83be339c80b5b4a6701) +++ tests/object-system.test (.../object-system.test) (revision c6057c18970d5bc19fe0f1f760ef0d29898ecfdd) @@ -142,20 +142,20 @@ o method bar {x} {return goo-$x} # dispatch without colon names -::nsf::dispatch o eval set :x 1 +::nsf::object::dispatch o eval set :x 1 ? {o info vars} x "simple dispatch has set variable x" ? {::nx::var set o x} 1 "simple dispatch has set variable x to 1" -? {::nsf::dispatch o foo} "goo" "simple dispatch with one arg works" -? {::nsf::dispatch o bar 1} "goo-1" "simple dispatch with two args works" +? {::nsf::object::dispatch o foo} "goo" "simple dispatch with one arg works" +? {::nsf::object::dispatch o bar 1} "goo-1" "simple dispatch with two args works" o destroy # dispatch with colon names Object create o {set :x 1} -::nsf::dispatch ::o ::incr x +::nsf::object::dispatch ::o ::incr x ? {o eval {set :x}} 1 "cmd dispatch without -frame object did not modify the instance variable" -::nsf::dispatch ::o -frame object ::incr x +::nsf::object::dispatch ::o -frame object ::incr x ? {o eval {set :x}} 2 "cmd dispatch -frame object modifies the instance variable" -? {catch {::nsf::dispatch ::o -frame object ::xxx x}} 1 "cmd dispatch with unknown command" +? {catch {::nsf::object::dispatch ::o -frame object ::xxx x}} 1 "cmd dispatch with unknown command" o destroy Object create o { @@ -166,16 +166,16 @@ return $results } } -::nsf::dispatch o ::eval {set x1 1; set :y1 1} -::nsf::dispatch o -frame method ::eval {set x2 1; set :y2 1} -::nsf::dispatch o -frame object ::eval {set x3 1; set :y3 1} +::nsf::object::dispatch o ::eval {set x1 1; set :y1 1} +::nsf::object::dispatch o -frame method ::eval {set x2 1; set :y2 1} +::nsf::object::dispatch o -frame object ::eval {set x3 1; set :y3 1} ? {o foo} "x1 0 y1 0 x2 0 y2 1 x3 1 y3 1" o destroy puts stderr ===MINI-OBJECTSYSTEM # test object system # create a minimal object system without internally dipatched methods -::nsf::createobjectsystem ::object ::class +::nsf::objectsystem::create ::object ::class ? {::nsf::object::exists ::object} 1 ? {::nsf::is class ::object} 1