Index: tests/submethods.test =================================================================== diff -u -r3ab1e160c5e9832a4d69c6f999a63d9706c4c956 -rf3127511bec503add89e7a691f33213b1999274d --- tests/submethods.test (.../submethods.test) (revision 3ab1e160c5e9832a4d69c6f999a63d9706c4c956) +++ tests/submethods.test (.../submethods.test) (revision f3127511bec503add89e7a691f33213b1999274d) @@ -375,10 +375,58 @@ o mixin ::M1 ? {o FOO foo} -::o-::M1-::o-- - + + o mixin {} + C mixin {} + # - # TODO: [current callingmethod], [current calledmethod] + # limit [current methodpath] to collect only ensemble methods? # + + o eval { + :public method faz {} {return [concat [current methodpath] [current method]]} + ? [list set _ [:faz]] "faz" + } + + # + # [current callingmethod] & [current callingclass] + # + + o eval { + set body {? [list set _ [:bar]] [current class]-[current]-[concat [current methodpath] [current method]]} + :public method "FOO foo" {} $body + :public method "BAR BUU boo" {} $body + :public method baz {} $body + + :method bar {} { + return "[current callingclass]-[current callingobject]-[current callingmethod]" + } + + :FOO foo + :BAR BUU boo + :baz + } + + C eval { + set body {? [list set _ [:bar]] [current class]-[current]-[concat [current methodpath] [current method]]} + :public method "FOO foo" {} $body + :public method "BAR BUU boo" {} $body + :public method baz {} $body + + :method bar {} { + return "[current callingclass]-[current callingobject]-[current callingmethod]" + } + + set c [:new] + $c FOO foo + $c BAR BUU boo + $c baz + } + + # + # [current calledmethod] + # + }