Index: TODO =================================================================== diff -u -re92bab3b262d521ac909fd8956352473909197fb -rd15bb1fa36c4f2cf118b2ce915928294e762d336 --- TODO (.../TODO) (revision e92bab3b262d521ac909fd8956352473909197fb) +++ TODO (.../TODO) (revision d15bb1fa36c4f2cf118b2ce915928294e762d336) @@ -3243,7 +3243,9 @@ 2 test are still open with tcl 8.5.10 (contains.test and xotcomm.test) - documented functions in nsfTrace.c - updated next-tutorial to the current naming conventions +- added tests for using submethod handles + TODO: - strange refcounting bug in 8.6b2 bug-is-86.tcl @@ -3307,9 +3309,6 @@ - call user defined setter in object parameters? - - [obj/cls info method handle "FOO foo"] does neither return a proper - submethod handle nor any valid handle ... needs a fix. - - NsfObjWrongArgs() & friends is not aware of submethods. Error messages print with the leaf method names only, e.g.: "anObj method ..." instead of " anObj info method ..." etc. Index: tests/info-method.test =================================================================== diff -u -r1b0a690f760447d8fc63aeded3e62c723e592c64 -rd15bb1fa36c4f2cf118b2ce915928294e762d336 --- tests/info-method.test (.../info-method.test) (revision 1b0a690f760447d8fc63aeded3e62c723e592c64) +++ tests/info-method.test (.../info-method.test) (revision d15bb1fa36c4f2cf118b2ce915928294e762d336) @@ -438,17 +438,36 @@ ? {lsort [C class info method submethods "foo"]} "x y" ? {lsort [C class info method submethods "foo x"]} "" + # + # method handles for ensemble methods + # ? {C info method handle "bar"} {::nsf::classes::C::bar} ? {C info method handle "bar a"} {::nsf::classes::C::bar a} ? {C info method handle "bar baz y"} {::nsf::classes::C::bar baz y} + # + # test whether the handles for ensemble methods work + # + ? {C info method parameter [C info method handle "bar"]} "" + ? {C info method parameter [C info method handle "bar b"]} "x:int y:upper" + ? {C info method parameter [C info method handle "bar baz y"]} "x:int y:upper" + + # + # check methods paths as method specifications + # ? {C info method definition "bar b"} {::C public method {bar b} {x:int y:upper} {return b}} ? {C info method definition "::nsf::classes::C::bar b"} {::C public method {bar b} {x:int y:upper} {return b}} ? {o2 info method definition "::nsf::classes::C::bar b"} {::C public method {bar b} {x:int y:upper} {return b}} + # + # test class modifier on handles + # ? {C class info method handle "foo"} {::C::foo} ? {C class info method handle "foo x"} {::C::foo x} + # + # info method definition with method paths + # ? {C class info method definition "::C::foo x"} {::C public class method {foo x} z:int {return z}} ? {C info method definition "::C::foo x"} {::C public class method {foo x} z:int {return z}} ? {o2 info method definition "::C::foo x"} {::C public class method {foo x} z:int {return z}} @@ -458,6 +477,9 @@ ? {C info method definition "::nsf::classes::C::bar baz y"} \ {::C public method {bar baz y} {x:int y:upper} {return y}} + # + # test "info method parameter" + # ? {nx::Object info method parameter "info lookup methods"} \ "-callprotection -incontext:switch -methodtype -nomixins:switch -path:switch -source pattern:optional" ? {nx::Object info method parametersyntax "info lookup methods"} \