Hi all
In SqMoose we added the following
testMooseNameOfCompiledMethod
"self debug: #testMooseNameOfCompiledMethod"
self assert: (TheRoot class>>#accessInstanceVariable) mooseName =
#'Smalltalk::TheRoot_class.accessInstanceVariable()'.
self assert: (TheRoot>>#accessingClass) mooseName =
#'Smalltalk::TheRoot.accessingClass()'.
"May be we could fix that too. using another notation so that we
could use the notation create method
name too"
self should: [ (TheRoot>>#zork) mooseName ] raise: Error.
testMooseNameOfInstanceVariable
self assert: (TheRoot@#x) = #'Smalltalk::TheRoot.x'.
"contrary to compiled method notation we do not garanty that the
class has an iv"
"we could! Now do we want"
self assert: (TheRoot@#foo) = #'Smalltalk::TheRoot.foo'.
self assert: (TheRoot class@#mx) = #'Smalltalk::TheRoot_class.mx'
testMooseNameOfClassVariable
"self debug: #testMooseNameOfClassVariable"
self assert: (TheRoot@#TheSharedVariable) =
#'Smalltalk::TheRoot.TheSharedVariable'.
"contrary to compiled method notation we do not garanty that the
class has an iv"
"we could! Now do we want? We could also have @@ for class variables."
"now the name of shared variable is always its class and not its
metaclass"
self assert: (TheRoot class @#TheSharedVariable) =
#'Smalltalk::TheRoot.TheSharedVariable'.
Now for compiled methods we could have a different way of doing it to
be able to build any names.
stef
Show replies by date