The Trunk: SystemChangeNotification-Tests-fbs.20.mcz

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

The Trunk: SystemChangeNotification-Tests-fbs.20.mcz

commits-2
Frank Shearar uploaded a new version of SystemChangeNotification-Tests to project The Trunk:
http://source.squeak.org/trunk/SystemChangeNotification-Tests-fbs.20.mcz

==================== Summary ====================

Name: SystemChangeNotification-Tests-fbs.20
Author: fbs
Time: 23 July 2013, 9:16:27.988 pm
UUID: 2e5843bc-9a94-7b48-a658-8fc3a944d576
Ancestors: SystemChangeNotification-Tests-ul.19

"Smalltalk keys" is deprecated; use "Smalltalk globals keys" instead.

=============== Diff against SystemChangeNotification-Tests-ul.19 ===============

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassAdded (in category 'testing') -----
  testClassAdded
  | aClassName |
  aClassName := self genericClassName.
  self
  change: [
  self createClass: aClassName.
  ]
  verify: [
+ self assert: (Smalltalk globals keys includes: aClassName).
- self assert: (Smalltalk keys includes: aClassName).
  ]
 
  !

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassRemoved (in category 'testing') -----
  testClassRemoved
  | aClass aClassName |
  aClassName := self genericClassName.
  self
  prepare: [
  aClass := self createClass: aClassName.
  ]
  change: [
  aClass removeFromSystem.
  ]
  verify: [
+ self deny: (Smalltalk globals keys includes: aClassName).
- self deny: (Smalltalk keys includes: aClassName).
  ].
  !

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassRenamed (in category 'testing') -----
  testClassRenamed
  | aClass aNewClassName anOldClassName |
  anOldClassName := self genericClassName.
  aNewClassName := self genericClassName.
  self
  prepare: [
  aClass := self createClass: anOldClassName.
  ]
  change: [
  aClass rename: aNewClassName.
  ]
  verify: [
+ self assert: (Smalltalk globals keys includes: aNewClassName).
+ self deny: (Smalltalk globals keys includes: anOldClassName).
- self assert: (Smalltalk keys includes: aNewClassName).
- self deny: (Smalltalk keys includes: anOldClassName).
  ].!

Item was changed:
  ----- Method: SystemChangeFileTest>>testExpressionDoIt (in category 'testing') -----
  testExpressionDoIt
  | aClassName |
  aClassName := self genericClassName..
  self
  prepare: [
  self createClass: aClassName.
  ]
  change: [
  Compiler evaluate: '(Smalltalk at: ', aClassName storeString, ') removeFromSystem'.
  ]
  verify: [
+ self deny: (Smalltalk globals keys includes: aClassName).
- self deny: (Smalltalk keys includes: aClassName).
  ].!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: SystemChangeNotification-Tests-fbs.20.mcz

Nicolas Cellier
includesKey: ?


2013/7/23 <[hidden email]>
Frank Shearar uploaded a new version of SystemChangeNotification-Tests to project The Trunk:
http://source.squeak.org/trunk/SystemChangeNotification-Tests-fbs.20.mcz

==================== Summary ====================

Name: SystemChangeNotification-Tests-fbs.20
Author: fbs
Time: 23 July 2013, 9:16:27.988 pm
UUID: 2e5843bc-9a94-7b48-a658-8fc3a944d576
Ancestors: SystemChangeNotification-Tests-ul.19

"Smalltalk keys" is deprecated; use "Smalltalk globals keys" instead.

=============== Diff against SystemChangeNotification-Tests-ul.19 ===============

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassAdded (in category 'testing') -----
  testClassAdded
        | aClassName |
        aClassName := self genericClassName.
        self
                change: [
                        self createClass: aClassName.
                ]
                verify: [
+                       self assert: (Smalltalk globals keys includes: aClassName).
-                       self assert: (Smalltalk keys includes: aClassName).
                ]

  !

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassRemoved (in category 'testing') -----
  testClassRemoved
        | aClass aClassName |
        aClassName := self genericClassName.
        self
                prepare: [
                        aClass := self createClass: aClassName.
                ]
                change: [
                        aClass removeFromSystem.
                ]
                verify: [
+                       self deny: (Smalltalk globals keys includes: aClassName).
-                       self deny: (Smalltalk keys includes: aClassName).
                ].
  !

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassRenamed (in category 'testing') -----
  testClassRenamed
        | aClass aNewClassName anOldClassName |
        anOldClassName := self genericClassName.
        aNewClassName := self genericClassName.
        self
                prepare: [
                        aClass := self createClass: anOldClassName.
                ]
                change: [
                        aClass rename: aNewClassName.
                ]
                verify: [
+                       self assert: (Smalltalk globals keys includes: aNewClassName).
+                       self deny: (Smalltalk globals keys includes: anOldClassName).
-                       self assert: (Smalltalk keys includes: aNewClassName).
-                       self deny: (Smalltalk keys includes: anOldClassName).
                ].!

Item was changed:
  ----- Method: SystemChangeFileTest>>testExpressionDoIt (in category 'testing') -----
  testExpressionDoIt
        | aClassName |
        aClassName := self genericClassName..
        self
                prepare: [
                        self createClass: aClassName.
                ]
                change: [
                        Compiler evaluate: '(Smalltalk at: ', aClassName storeString, ') removeFromSystem'.
                ]
                verify: [
+                       self deny: (Smalltalk globals keys includes: aClassName).
-                       self deny: (Smalltalk keys includes: aClassName).
                ].!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: SystemChangeNotification-Tests-fbs.20.mcz

Frank Shearar-3
That might be even better! Commits welcome!

(I just wanted to fix the test, which failed because that image now
doesn't have 45Deprecated loaded.)

frank

On 23 July 2013 22:20, Nicolas Cellier
<[hidden email]> wrote:

> includesKey: ?
>
>
> 2013/7/23 <[hidden email]>
>
>> Frank Shearar uploaded a new version of SystemChangeNotification-Tests to
>> project The Trunk:
>> http://source.squeak.org/trunk/SystemChangeNotification-Tests-fbs.20.mcz
>>
>> ==================== Summary ====================
>>
>> Name: SystemChangeNotification-Tests-fbs.20
>> Author: fbs
>> Time: 23 July 2013, 9:16:27.988 pm
>> UUID: 2e5843bc-9a94-7b48-a658-8fc3a944d576
>> Ancestors: SystemChangeNotification-Tests-ul.19
>>
>> "Smalltalk keys" is deprecated; use "Smalltalk globals keys" instead.
>>
>> =============== Diff against SystemChangeNotification-Tests-ul.19
>> ===============
>>
>> Item was changed:
>>   ----- Method: SystemChangeFileTest>>testClassAdded (in category
>> 'testing') -----
>>   testClassAdded
>>         | aClassName |
>>         aClassName := self genericClassName.
>>         self
>>                 change: [
>>                         self createClass: aClassName.
>>                 ]
>>                 verify: [
>> +                       self assert: (Smalltalk globals keys includes:
>> aClassName).
>> -                       self assert: (Smalltalk keys includes:
>> aClassName).
>>                 ]
>>
>>   !
>>
>> Item was changed:
>>   ----- Method: SystemChangeFileTest>>testClassRemoved (in category
>> 'testing') -----
>>   testClassRemoved
>>         | aClass aClassName |
>>         aClassName := self genericClassName.
>>         self
>>                 prepare: [
>>                         aClass := self createClass: aClassName.
>>                 ]
>>                 change: [
>>                         aClass removeFromSystem.
>>                 ]
>>                 verify: [
>> +                       self deny: (Smalltalk globals keys includes:
>> aClassName).
>> -                       self deny: (Smalltalk keys includes: aClassName).
>>                 ].
>>   !
>>
>> Item was changed:
>>   ----- Method: SystemChangeFileTest>>testClassRenamed (in category
>> 'testing') -----
>>   testClassRenamed
>>         | aClass aNewClassName anOldClassName |
>>         anOldClassName := self genericClassName.
>>         aNewClassName := self genericClassName.
>>         self
>>                 prepare: [
>>                         aClass := self createClass: anOldClassName.
>>                 ]
>>                 change: [
>>                         aClass rename: aNewClassName.
>>                 ]
>>                 verify: [
>> +                       self assert: (Smalltalk globals keys includes:
>> aNewClassName).
>> +                       self deny: (Smalltalk globals keys includes:
>> anOldClassName).
>> -                       self assert: (Smalltalk keys includes:
>> aNewClassName).
>> -                       self deny: (Smalltalk keys includes:
>> anOldClassName).
>>                 ].!
>>
>> Item was changed:
>>   ----- Method: SystemChangeFileTest>>testExpressionDoIt (in category
>> 'testing') -----
>>   testExpressionDoIt
>>         | aClassName |
>>         aClassName := self genericClassName..
>>         self
>>                 prepare: [
>>                         self createClass: aClassName.
>>                 ]
>>                 change: [
>>                         Compiler evaluate: '(Smalltalk at: ', aClassName
>> storeString, ') removeFromSystem'.
>>                 ]
>>                 verify: [
>> +                       self deny: (Smalltalk globals keys includes:
>> aClassName).
>> -                       self deny: (Smalltalk keys includes: aClassName).
>>                 ].!
>>
>>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: SystemChangeNotification-Tests-fbs.20.mcz

Frank Shearar-3
OK, so I couldn't stop myself. See
SystemChangeNotification-Tests-fbs.21 which uses #includesKey:.

I _could_ have just used `Smalltalk includesKey:` but I'm not sure I
like the `Smalltalk allTheThings` pattern. Whatever class Smalltalk
uses then has a heavy burden of having to supply interfaces to
everything. So I chickened out and used `Smalltalk globals` instead.

frank

On 23 July 2013 22:25, Frank Shearar <[hidden email]> wrote:

> That might be even better! Commits welcome!
>
> (I just wanted to fix the test, which failed because that image now
> doesn't have 45Deprecated loaded.)
>
> frank
>
> On 23 July 2013 22:20, Nicolas Cellier
> <[hidden email]> wrote:
>> includesKey: ?
>>
>>
>> 2013/7/23 <[hidden email]>
>>
>>> Frank Shearar uploaded a new version of SystemChangeNotification-Tests to
>>> project The Trunk:
>>> http://source.squeak.org/trunk/SystemChangeNotification-Tests-fbs.20.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: SystemChangeNotification-Tests-fbs.20
>>> Author: fbs
>>> Time: 23 July 2013, 9:16:27.988 pm
>>> UUID: 2e5843bc-9a94-7b48-a658-8fc3a944d576
>>> Ancestors: SystemChangeNotification-Tests-ul.19
>>>
>>> "Smalltalk keys" is deprecated; use "Smalltalk globals keys" instead.
>>>
>>> =============== Diff against SystemChangeNotification-Tests-ul.19
>>> ===============
>>>
>>> Item was changed:
>>>   ----- Method: SystemChangeFileTest>>testClassAdded (in category
>>> 'testing') -----
>>>   testClassAdded
>>>         | aClassName |
>>>         aClassName := self genericClassName.
>>>         self
>>>                 change: [
>>>                         self createClass: aClassName.
>>>                 ]
>>>                 verify: [
>>> +                       self assert: (Smalltalk globals keys includes:
>>> aClassName).
>>> -                       self assert: (Smalltalk keys includes:
>>> aClassName).
>>>                 ]
>>>
>>>   !
>>>
>>> Item was changed:
>>>   ----- Method: SystemChangeFileTest>>testClassRemoved (in category
>>> 'testing') -----
>>>   testClassRemoved
>>>         | aClass aClassName |
>>>         aClassName := self genericClassName.
>>>         self
>>>                 prepare: [
>>>                         aClass := self createClass: aClassName.
>>>                 ]
>>>                 change: [
>>>                         aClass removeFromSystem.
>>>                 ]
>>>                 verify: [
>>> +                       self deny: (Smalltalk globals keys includes:
>>> aClassName).
>>> -                       self deny: (Smalltalk keys includes: aClassName).
>>>                 ].
>>>   !
>>>
>>> Item was changed:
>>>   ----- Method: SystemChangeFileTest>>testClassRenamed (in category
>>> 'testing') -----
>>>   testClassRenamed
>>>         | aClass aNewClassName anOldClassName |
>>>         anOldClassName := self genericClassName.
>>>         aNewClassName := self genericClassName.
>>>         self
>>>                 prepare: [
>>>                         aClass := self createClass: anOldClassName.
>>>                 ]
>>>                 change: [
>>>                         aClass rename: aNewClassName.
>>>                 ]
>>>                 verify: [
>>> +                       self assert: (Smalltalk globals keys includes:
>>> aNewClassName).
>>> +                       self deny: (Smalltalk globals keys includes:
>>> anOldClassName).
>>> -                       self assert: (Smalltalk keys includes:
>>> aNewClassName).
>>> -                       self deny: (Smalltalk keys includes:
>>> anOldClassName).
>>>                 ].!
>>>
>>> Item was changed:
>>>   ----- Method: SystemChangeFileTest>>testExpressionDoIt (in category
>>> 'testing') -----
>>>   testExpressionDoIt
>>>         | aClassName |
>>>         aClassName := self genericClassName..
>>>         self
>>>                 prepare: [
>>>                         self createClass: aClassName.
>>>                 ]
>>>                 change: [
>>>                         Compiler evaluate: '(Smalltalk at: ', aClassName
>>> storeString, ') removeFromSystem'.
>>>                 ]
>>>                 verify: [
>>> +                       self deny: (Smalltalk globals keys includes:
>>> aClassName).
>>> -                       self deny: (Smalltalk keys includes: aClassName).
>>>                 ].!
>>>
>>>
>>
>>
>>
>>