The Trunk: Tests-cmm.256.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-cmm.256.mcz

commits-2
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]]].!

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.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Frank Shearar-3
On 03 Oct 2013, at 19:52, [hidden email] 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.!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Chris Muller-3
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 <[hidden email]> wrote:

> On 03 Oct 2013, at 19:52, [hidden email] 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.!
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Frank Shearar-3
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 <[hidden email]> 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 <[hidden email]> wrote:
>> On 03 Oct 2013, at 19:52, [hidden email] 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.!
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Chris Muller-3
RecentMessages already handles display of missing methods, why do we
need purgeMissingMethods, et al anyway?

On Fri, Oct 4, 2013 at 10:16 AM, Frank Shearar <[hidden email]> wrote:

> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>> On 03 Oct 2013, at 19:52, [hidden email] 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.!
>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Frank Shearar-3
Then let's delete it rather. I "wrote" it (moved it, really) because
it was an existing feature, and if it's not useful rather kill it than
move it to Tests. I don't recall, but I'd suspect the only callers of
the purge: stuff now are tests for the purge: stuff.

frank

On 4 October 2013 16:51, Chris Muller <[hidden email]> wrote:

> RecentMessages already handles display of missing methods, why do we
> need purgeMissingMethods, et al anyway?
>
> On Fri, Oct 4, 2013 at 10:16 AM, Frank Shearar <[hidden email]> wrote:
>> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>> On 03 Oct 2013, at 19:52, [hidden email] 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.!
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Chris Muller-3
Hi Frank, finally getting around to doing this.  Do you mind if I also
remove #revertLast and its tests?

On Fri, Oct 4, 2013 at 12:21 PM, Frank Shearar <[hidden email]> wrote:

> Then let's delete it rather. I "wrote" it (moved it, really) because
> it was an existing feature, and if it's not useful rather kill it than
> move it to Tests. I don't recall, but I'd suspect the only callers of
> the purge: stuff now are tests for the purge: stuff.
>
> frank
>
> On 4 October 2013 16:51, Chris Muller <[hidden email]> wrote:
>> RecentMessages already handles display of missing methods, why do we
>> need purgeMissingMethods, et al anyway?
>>
>> On Fri, Oct 4, 2013 at 10:16 AM, Frank Shearar <[hidden email]> wrote:
>>> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>> On 03 Oct 2013, at 19:52, [hidden email] 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.!
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-cmm.256.mcz

Frank Shearar-3
Sure, as long as it makes sense to do so :) I mean, I just made a more or less faithful copy of an existing facility. I applied no effort to thinking about whether any particular feature was valuable of useful.

At the very least it needs a rename, because it's not immediately obvious to me what 'last' means here. Revert most recent? Revert oldest? I don't know!

frank

On 11 Oct 2013, at 19:39, Chris Muller <[hidden email]> wrote:

> Hi Frank, finally getting around to doing this.  Do you mind if I also
> remove #revertLast and its tests?
>
> On Fri, Oct 4, 2013 at 12:21 PM, Frank Shearar <[hidden email]> wrote:
>> Then let's delete it rather. I "wrote" it (moved it, really) because
>> it was an existing feature, and if it's not useful rather kill it than
>> move it to Tests. I don't recall, but I'd suspect the only callers of
>> the purge: stuff now are tests for the purge: stuff.
>>
>> frank
>>
>> On 4 October 2013 16:51, Chris Muller <[hidden email]> wrote:
>>> RecentMessages already handles display of missing methods, why do we
>>> need purgeMissingMethods, et al anyway?
>>>
>>> On Fri, Oct 4, 2013 at 10:16 AM, Frank Shearar <[hidden email]> wrote:
>>>> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>>> On 03 Oct 2013, at 19:52, [hidden email] 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.!
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>