The Trunk: SystemChangeNotification-Tests-pre.24.mcz

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

The Trunk: SystemChangeNotification-Tests-pre.24.mcz

commits-2
Patrick Rein uploaded a new version of SystemChangeNotification-Tests to project The Trunk:
http://source.squeak.org/trunk/SystemChangeNotification-Tests-pre.24.mcz

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

Name: SystemChangeNotification-Tests-pre.24
Author: pre
Time: 1 July 2016, 4:32:20.840983 pm
UUID: 3d2acb51-0e7b-1b46-a301-79ea87277a78
Ancestors: SystemChangeNotification-Tests-nice.23

Fixes system notifcation tests to not polute the existing kernel packages with changes by writing new classes into a temporary package

=============== Diff against SystemChangeNotification-Tests-nice.23 ===============

Item was added:
+ ----- Method: ChangeHooksTest>>categoryForTestName (in category 'Private-Generation') -----
+ categoryForTestName
+
+ ^ self class name select: [:c | c isUppercase ]!

Item was added:
+ ----- Method: ChangeHooksTest>>categoryForTestName1 (in category 'Private-Generation') -----
+ categoryForTestName1
+
+ ^ self categoryForTestName , 1!

Item was added:
+ ----- Method: ChangeHooksTest>>categoryForTestName2 (in category 'Private-Generation') -----
+ categoryForTestName2
+
+ ^ self categoryForTestName , 2!

Item was changed:
  ----- Method: ChangeHooksTest>>classCreationEvent: (in category 'Events-Classes') -----
  classCreationEvent: event
 
  | classCreated |
  self addSingleEvent: event.
  classCreated := Smalltalk classNamed: self newlyCreatedClassName.
  self assert: classCreated notNil.
  self
  assert: ((Smalltalk organization
+ listAtCategoryNamed: self categoryForTestName1)
- listAtCategoryNamed: #'System-Change Notification')
  includes: self newlyCreatedClassName).
  self
  checkEvent: event
  kind: #Added
  item: classCreated
  itemKind: AbstractEvent classKind!

Item was changed:
  ----- Method: ChangeHooksTest>>classRecategorizedEvent: (in category 'Events-Classes') -----
  classRecategorizedEvent: event
 
  self addSingleEvent: event.
  self
  checkEvent: event
  kind: #Recategorized
  item: generatedTestClass
  itemKind: AbstractEvent classKind.
+ self assert: event oldCategory = self categoryForTestName1!
- self assert: event oldCategory = #'System-Change Notification'!

Item was changed:
  ----- Method: ChangeHooksTest>>generateTestClass (in category 'Private-Generation') -----
  generateTestClass
 
  generatedTestClass := Object
  subclass: self generatedTestClassName
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName1.!
- category: 'System-Change Notification'.!

Item was changed:
  ----- Method: ChangeHooksTest>>generateTestClassX (in category 'Private-Generation') -----
  generateTestClassX
 
  generatedTestClassX := Object
  subclass: self generatedTestClassNameX
  instanceVariableNames: 'x'
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName1.!
- category: 'System-Change Notification'.!

Item was changed:
  ----- Method: ChangeHooksTest>>tearDown (in category 'Running') -----
  tearDown
 
  self removeGeneratedTestClasses.
  ChangeSet newChanges: previousChangeSet.
  ChangesOrganizer removeChangeSet: testsChangeSet.
  previousChangeSet := nil.
  testsChangeSet := nil.
  capturedEvents := nil.
  createdMethod := nil.
+ (PackageOrganizer default packages select: [:packageInfo | {self categoryForTestName1 . self categoryForTestName2} includes: packageInfo packageName ])
+ do: [:packageInfo | packageInfo workingCopy unload].
  super tearDown!

Item was changed:
  ----- Method: ChangeHooksTest>>testClassCreationEvent (in category 'Testing-Classes') -----
  testClassCreationEvent
 
  self systemChangeNotifier notify: self
  ofAllSystemChangesUsing: #classCreationEvent:.
  Object
  subclass: self newlyCreatedClassName
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName1.
- category: 'System-Change Notification'.
  self checkForOnlySingleEvent!

Item was changed:
  ----- Method: ChangeHooksTest>>testClassRecategorizedEvent1 (in category 'Testing-Classes') -----
  testClassRecategorizedEvent1
 
  self systemChangeNotifier notify: self
  ofAllSystemChangesUsing: #classRecategorizedEvent:.
  Object
  subclass: generatedTestClass name
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName2.
- category: 'Collections-Abstract'.
  self checkForOnlySingleEvent!

Item was changed:
  ----- Method: ChangeHooksTest>>testClassRecategorizedEvent2 (in category 'Testing-Classes') -----
  testClassRecategorizedEvent2
 
  self systemChangeNotifier notify: self
  ofAllSystemChangesUsing: #classRecategorizedEvent:.
+ generatedTestClass category: self categoryForTestName2.
- generatedTestClass category: 'Collections-Abstract'.
  self checkForOnlySingleEvent!

Item was changed:
  ----- Method: ChangeHooksTest>>testClassSuperChangedEvent (in category 'Testing-Classes') -----
  testClassSuperChangedEvent
 
  self systemChangeNotifier notify: self
  ofAllSystemChangesUsing: #classSuperChangedEvent:.
  Model
  subclass: generatedTestClass name
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName1.
- category: 'System-Change Notification'.
  self checkForOnlySingleEvent!

Item was changed:
  ----- Method: ChangeHooksTest>>testInstanceVariableCreationEvent1 (in category 'Testing-Instance Variables') -----
  testInstanceVariableCreationEvent1
 
  self systemChangeNotifier notify: self
  ofAllSystemChangesUsing: #instanceVariableCreationEvent:.
  Object
  subclass: self generatedTestClassName
  instanceVariableNames: 'x'
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName1.
- category: 'System-Change Notification'.
  self checkForOnlySingleEvent!

Item was changed:
  ----- Method: ChangeHooksTest>>testInstanceVariableRemovedEvent1 (in category 'Testing-Instance Variables') -----
  testInstanceVariableRemovedEvent1
 
  self systemChangeNotifier notify: self
  ofAllSystemChangesUsing: #instanceVariableRemovedEvent:.
  Object
  subclass: generatedTestClassX name
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
+ category: self categoryForTestName1.
- category: 'System-Change Notification'.
  self checkForOnlySingleEvent!