Index: tests/info-method.tcl =================================================================== diff -u -r404ad6bfcb313983a0cc54d3323751008bca991b -rb69a9b8de677b30774419057953a91c96df00e56 --- tests/info-method.tcl (.../info-method.tcl) (revision 404ad6bfcb313983a0cc54d3323751008bca991b) +++ tests/info-method.tcl (.../info-method.tcl) (revision b69a9b8de677b30774419057953a91c96df00e56) @@ -324,11 +324,11 @@ {::C public method {bar baz y} {x:int y:upper} {return y}} ? {nx::Object info method parameter "info lookup methods"} \ - "-methodtype -callprotection -source -nomixins -incontext pattern:optional" + "-callprotection -expand -incontext -methodtype -nomixins -source pattern:optional" ? {o info method parameter "foo b"} "x:int y:upper" ? {nx::Object info method parameter ::nx::Object::slot::__info::lookup::methods} \ - "-methodtype -callprotection -source -nomixins -incontext pattern:optional" + "-callprotection -expand -incontext -methodtype -nomixins -source pattern:optional" ? {o info method parameter "::o::foo::b"} "x:int y:upper" ? {nx::Object info method handle "info"} "::nsf::classes::nx::Object::info" @@ -361,19 +361,41 @@ ? {lsort [::nx::Object info methods -expand "*filter*"]} \ "filter {info filter guard} {info filter methods} {info lookup filter}" - ::nx::Object create o1 ::nx::Class create C { :public method "string length" {s} {puts length} :public method "string reverse" {s} {puts reverse} :public method foo {} {puts foo} :protected method "a b c" {} {puts "a b c"} :protected method "a b d" {} {puts "a b d"} :public method "a c" {d c} {puts "a c"} + :create c1 } - + nx::Class create D { + :superclass C + :public method "string length" {s} {puts length} + :public method "string compress" {s} {puts compress} + :create d1 + } ? {lsort [C info methods -expand -callprotection all]} \ "{a b c} {a b d} {a c} foo {string length} {string reverse}" ? {lsort [C info methods -expand]} \ "{a c} foo {string length} {string reverse}" - + + # + # lookup ensemble methods + # + ? {lsort [c1 info lookup methods -expand "string *"]} \ + "{string length} {string reverse}" + # + # lookup ensemble methods combined from multiple classes + # + ? {lsort [d1 info lookup methods -expand "string *"]} \ + "{string compress} {string length} {string reverse}" + + # + # search for ensemble method + # + ? {lsort [d1 info lookup method "string length"]} "::nsf::classes::D::string length" + ? {lsort [d1 info lookup method "string reverse"]} "::nsf::classes::C::string reverse" + } \ No newline at end of file