[squeak-dev] The Trunk: Tests-cmm.256.mcz

Frank Shearar frank.shearar at gmail.com
Fri Oct 4 15:16:31 UTC 2013


These aren't testing methods, they're not special access that only
tests need. They're cleanup functionality called by the user. The
original methods in Utilities had _no_ senders (because they had no
tests either).

They're also not methods that cause an inter-package dependency in the
wrong direction, so the reason for moving them (my reorganising work)
doesn't apply here. Specifically, it doesn't matter that Tests depends
on System, because it _must_ do so.

frank

On 4 October 2013 16:04, Chris Muller <asqueaker at gmail.com> wrote:
> They were moved to Tests by the same basis you've been reorganizing
> lots and lots of methods -- to the package where resides their only
> senders.
>
> On Fri, Oct 4, 2013 at 2:48 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>> On 03 Oct 2013, at 19:52, commits at source.squeak.org wrote:
>>
>>> Chris Muller uploaded a new version of Tests to project The Trunk:
>>> http://source.squeak.org/trunk/Tests-cmm.256.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Tests-cmm.256
>>> Author: cmm
>>> Time: 3 October 2013, 2:52:17.76 pm
>>> UUID: c46a7f7b-159f-4f8c-9e26-ab6f97290614
>>> Ancestors: Tests-nice.255
>>>
>>> Changes for updates to RecentMessages in System-cmm.600.
>>>
>>> =============== Diff against Tests-nice.255 ===============
>>>
>>> Item was added:
>>> + ----- Method: RecentMessages>>purge: (in category '*tests') -----
>>> + purge: aMethodReference
>>> +    methodReferences remove: aMethodReference.!
>>>
>>> Item was added:
>>> + ----- Method: RecentMessages>>purgeMissingMethods (in category '*tests') -----
>>> + purgeMissingMethods
>>> +    methodReferences := methodReferences select: [:mref | |cls|
>>> +        cls := mref actualClass.
>>> +        cls notNil
>>> +            and: [cls isInMemory]
>>> +            and: [mref selector == #Comment or: [(cls compiledMethodAt: mref selector ifAbsent: [nil]) notNil]]].
>>
>> OK so in my defence I'm on my phone, and the pinhole. IWW on my email prevented me from seeing this as a moving of methods. I still don't get it though. This was part of Utilities' version of this, not test scaffolding.
>>
>> frank
>>
>>> Item was changed:
>>>  ----- Method: RecentMessagesTest>>testMaximumSubmissionCountCapsReferenceCount (in category 'testing') -----
>>>  testMaximumSubmissionCountCapsReferenceCount
>>>      rm maximumSubmissionCount: 2.
>>>      rm recordSelector: #foo forClass: Utilities inEnvironment: Smalltalk globals.
>>>      rm recordSelector: #bar forClass: Utilities inEnvironment: Smalltalk globals.
>>>      rm recordSelector: #baz forClass: Utilities inEnvironment: Smalltalk globals.
>>> +    self assert: #bar equals: rm leastRecent selector.!
>>> -    self assert: #bar equals: rm oldest selector.!
>>>
>>> Item was changed:
>>>  ----- Method: RecentMessagesTest>>testOldestReturnsOldestSubmission (in category 'testing') -----
>>>  testOldestReturnsOldestSubmission
>>> +    self assert: nil equals: rm leastRecent description: 'Return nil if no submissions yet'.
>>> -    self assert: nil equals: rm oldest description: 'Return nil if no submissions yet'.
>>>      rm recordSelector: #foo forClass: Utilities inEnvironment: Smalltalk globals.
>>> +    self assert: #foo equals: rm leastRecent selector.
>>> -    self assert: #foo equals: rm oldest selector.
>>>      rm recordSelector: #baz forClass: Utilities inEnvironment: Smalltalk globals.
>>> +    self assert: #foo equals: rm leastRecent selector.!
>>> -    self assert: #foo equals: rm oldest selector.!
>>>
>>>
>>
>


More information about the Squeak-dev mailing list