Index: tests/aliastest.xotcl =================================================================== diff -u -r9f7fa883bf6ed48f1401f815caca1e34f56584a1 -rf6be3f63eadda89d7f419a090d86669c6be84c3b --- tests/aliastest.xotcl (.../aliastest.xotcl) (revision 9f7fa883bf6ed48f1401f815caca1e34f56584a1) +++ tests/aliastest.xotcl (.../aliastest.xotcl) (revision f6be3f63eadda89d7f419a090d86669c6be84c3b) @@ -23,10 +23,12 @@ Foo create f1 ? {f1 foo} 1 ? {f1 foo -x 2} 2 +? {Foo info methods -defined -methodtype alias} "foo" ? {Base info methods -defined -methodtype scripted} {foo} ? {Foo info methods -defined -methodtype scripted} {foo} Base method foo {} {} +? {Foo info methods -defined -methodtype alias} "" ? {Base info methods -defined -methodtype scripted} {} ? {Foo info methods -defined -methodtype scripted} {} @@ -35,35 +37,14 @@ ? {Base info methods -defined -methodtype scripted} {foo} "defined again" ? {Foo info methods -defined -methodtype scripted} {foo} "aliased again" -# When the next three lines are added, we crash on exit Foo method foo {} {} ? {Base info methods -defined -methodtype scripted} {foo} "still defined" ? {Foo info methods -defined -methodtype scripted} {} "removed" -::xotcl::use xotcl1 - -::xotcl::alias ::xotcl::Object contains ::xotcl::classes::xotcl2::Object::contains - -::xotcl::Class create C -::C contains -object ::C::slot { - Attribute create x -initcmd {set x 1} - Attribute create y -initcmd {incr ::hu} - Attribute create z -initcmd {my trace add variable z read T1} -} - -? {::C info slots} "::C::slot::x ::C::slot::y ::C::slot::z" - -? {catch {::C contains -x 1 -object ::C::slot { - Attribute create w -initcmd {my trace add variable z read T1} -}}} 1 - -::xotcl::use xotcl2 - # # chaining aliases # - Class create T Class create S T create t @@ -113,6 +94,7 @@ ::xotcl::alias T BAR -per-object ::T::FOO ::xotcl::alias T ZAP -per-object ::T::BAR ? {T info methods -defined -methodtype scripted} {foo} +? {lsort [T info methods -defined -per-object -methodtype alias]} {BAR FOO ZAP} ? {lsort [T info methods -per-object -defined -methodtype scripted]} {BAR FOO ZAP bar} ? {t foo} ::T->foo #