Index: tests/info-method.test =================================================================== diff -u -r4f17631ecd74cd12f18168931a93b46908cec01b -re7a27ff80df0f9c20be649e1ea1d0bc55f045739 --- tests/info-method.test (.../info-method.test) (revision 4f17631ecd74cd12f18168931a93b46908cec01b) +++ tests/info-method.test (.../info-method.test) (revision e7a27ff80df0f9c20be649e1ea1d0bc55f045739) @@ -169,22 +169,46 @@ ::nx::configure defaultMethodCallProtection false } -nx::Test case subobj { +# +# Test visability of obj-objects +# + +nx::Test case sub-objects { ::nx::Object create o { ::nx::Object create [::nx::self]::sub { :method foo {} {;} } - :alias subal ::o::sub + :public alias soAlias ::o::sub } - ? {o info methods} "sub subal" + ? {o info methods} "soAlias" + ? {o info method type soAlias} "alias" + + nsf::object::property ::o::sub allowmethoddispatch on + ? {o info methods} "soAlias sub" ? {o info method type sub} "object" ? {o info method definition sub} "::nx::Object create ::o::sub" - ? {o info method type subal} "alias" } -package req nx -package require nx::test +# +# Test visability of aliased Objects +# +nx::Test case sub-objects { + ::nx::Object create ::I + ::nx::Class create C { + :public alias i ::I + :create c1 + } + ? {C info methods i} "" + ? {c1 info lookup methods i} "" + ::nsf::object::property ::I allowmethoddispatch 1 + ? {C info methods i} "i" + ? {c1 info lookup methods i} "i" +} + + +#package require nx::test + # # Introspect the returns method property throught the "info method" # API chunk ...