A new version of SUnitGUI was added to project The Inbox:
http://source.squeak.org/inbox/SUnitGUI-jr.65.mcz ==================== Summary ==================== Name: SUnitGUI-jr.65 Author: jr Time: 2 March 2017, 11:16:47.351687 pm UUID: 2fc0a490-bd92-cc43-96c7-ede4b233243d Ancestors: SUnitGUI-mt.64 make TestRunner work in another environment use with the following code snippet: someEnvironment beCurrentDuring: [TestRunner open] =============== Diff against SUnitGUI-mt.64 =============== Item was changed: Model subclass: #TestRunner + instanceVariableNames: 'categories categoriesSelected classes classIndex classesSelected failedList failedSelected errorList errorSelected lastUpdate result previousRun categoryPattern classPattern environment' - instanceVariableNames: 'categories categoriesSelected classes classIndex classesSelected failedList failedSelected errorList errorSelected lastUpdate result previousRun categoryPattern classPattern' classVariableNames: '' poolDictionaries: '' category: 'SUnitGUI'! !TestRunner commentStamp: '<historical>' prior: 0! <lint: #ignore rule: #classNotReferenced rational: 'this view is only accessed from menus'> ! Item was added: + ----- Method: TestRunner>>environment (in category 'accessing') ----- + environment + ^ environment ifNil: [Smalltalk globals]! Item was added: + ----- Method: TestRunner>>environment: (in category 'accessing') ----- + environment: anEnvironment + environment := anEnvironment. + self update; reset! Item was changed: ----- Method: TestRunner>>findCategories (in category 'utilities') ----- findCategories | visible | visible := Set new. self baseClass withAllSubclassesDo: [ :each | each category ifNotNil: [ :category | visible add: category ] ]. ^ Array streamContents: [ :stream | + self environment organization categories do: [ :each | - Smalltalk organization categories do: [ :each | (visible includes: each) ifTrue: [ stream nextPut: each ] ] ].! Item was changed: ----- Method: TestRunner>>findClassesForCategories: (in category 'utilities') ----- findClassesForCategories: aCollection + | environment items | - | items | aCollection isEmpty ifTrue: [ ^ self baseClass withAllSubclasses asSet ]. + environment := self environment. items := aCollection gather: [ :category | + ((environment organization listAtCategoryNamed: category) + collect: [ :each | environment valueOf: each ]) - ((Smalltalk organization listAtCategoryNamed: category) - collect: [ :each | Smalltalk at: each ]) select: [ :each | each includesBehavior: self baseClass ] ]. ^ items asSet.! Item was changed: ----- Method: TestRunner>>initialize (in category 'initialization') ----- initialize super initialize. failedList := errorList := Array new. SystemChangeNotifier uniqueInstance notify: self ofSystemChangesOfItem: #class change: #Added using: #update; notify: self ofSystemChangesOfItem: #category change: #Added using: #update; notify: self ofSystemChangesOfItem: #class change: #Removed using: #update; notify: self ofSystemChangesOfItem: #category change: #Removed using: #update; notify: self ofSystemChangesOfItem: #class change: #Renamed using: #update; notify: self ofSystemChangesOfItem: #category change: #Renamed using: #update; notify: self ofSystemChangesOfItem: #class change: #Recategorized using: #update; notify: self ofSystemChangesOfItem: #category change: #Recategorized using: #update. + environment := Environment current. self update; reset! Item was changed: ----- Method: TestRunner>>label (in category 'accessing-ui') ----- label + ^ 'Test Runner in environment ', environment name! - ^ 'Test Runner' ! |
Free forum by Nabble | Edit this page |