[squeak-dev] Creating temporary classes for testing
Sean P. DeNigris
sean at clipperadams.com
Thu Dec 9 01:05:56 UTC 2010
I was playing with creating temporary classes for testing in a separate
SystemDictionary, so I don't have to worry about removing them. But I'm a
little beyond the boundary of my knowledge (although I stepped through it in
the debugger and it seemed pretty straight forward). Are there any hidden
side-effects/implications of the following? Specifically, after the
SystemDictionary is garbage collected, is the system exactly the same as it
was before the code was run:
testingEnvironment := SystemDictionary new.
ClassBuilder new
name: #AClassForTesting
inEnvironment: testingEnvironment
subclassOf: Object
type: Object typeOfClass
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'TemporaryTesting'.
morph := (testingEnvironment at: #AClassForTesting) asMorph openInWorld.
morph delete.
Thanks.
Sean
--
View this message in context: http://forum.world.st/Creating-temporary-classes-for-testing-tp3079433p3079433.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|