[squeak-dev] [SUnit] how to: clean up *all* obsolete classes during
tests?
Max Leske
maxleske at gmail.com
Tue Feb 26 23:32:12 UTC 2013
I have I case where I absolutely need to get rid of all obsolete classes but #fixObsoleteReferences simply refuses to nuke all entries in the #ObsoleteSubclasses variable of Behavior. The classes and meta classes that don't go away are subclasses of ClassFactoryForTestCase and I do send it the #cleanup method.
I noticed that this only is true as long as the test runner is open. Once I close the test runner, #fixObsoleteReferences succeeds. But that doesn't really help me because my test case fails *in* the test runner of course…
Here's a test case that illustrates my problem:
ClassFactoryForTestCaseTest>>testObsoleteReferences
factory delete: factory new class.
factory cleanUp.
self
shouldnt: [ Smalltalk fixObsoleteReferences ]
raise: Error
Image: 4.4
Build: #12320
VM: SqueakVM 4.2.5.bea1U
Cheers,
Max
More information about the Squeak-dev
mailing list
|