Nicolas Cellier uploaded a new version of SUnitGUI to project The Trunk:
http://source.squeak.org/trunk/SUnitGUI-nice.46.mcz ==================== Summary ==================== Name: SUnitGUI-nice.46 Author: nice Time: 27 December 2009, 3:58:09 am UUID: f85ca18d-f072-452f-9b4d-8024318b6176 Ancestors: SUnitGUI-ul.45 Cosmetic: move or remove a few temps inside closures =============== Diff against SUnitGUI-ul.45 =============== Item was changed: ----- Method: TestRunner>>classList (in category 'accessing-classes') ----- classList + | offset | - | offset ident | classes isEmpty ifTrue: [ ^ classes ]. offset := classes first allSuperclasses size. + ^ classes collect: [ :each | | ident | - ^ classes collect: [ :each | ident := String new: 2 * (0 max: each allSuperclasses size - offset) withAll: $ . each isAbstract ifFalse: [ ident , each name ] ifTrue: [ ident asText , each name asText addAttribute: TextEmphasis italic; yourself ] ].! Item was changed: ----- Method: TestRunner>>showProgress (in category 'history saving') ----- showProgress + | testCaseClasses d string | - | testCaseClasses d t string | testCaseClasses := (self suiteAll tests collect: [:testCase | testCase class]) asSet. "At the end of the algorithm, d will contains all the diff between what was saved and the current result" d := Dictionary new. d at: #passed put: OrderedCollection new. d at: #failures put: OrderedCollection new. d at: #errors put: OrderedCollection new. + testCaseClasses do: [ :cls | | t | - testCaseClasses do: [ :cls | (cls class methodDict includesKey: #lastStoredRun) ifTrue: [t := cls lastStoredRun. (t at: #passed) do: [:s | (result isErrorFor: cls selector: s) ifTrue: [(d at: #errors) add: {cls . s}]. (result isFailureFor: cls selector: s) ifTrue: [(d at: #failures) add: {cls . s}] ]. (t at: #failures) do: [:s | (result isPassedFor: cls selector: s) ifTrue: [(d at: #passed) add: {cls . s}]. (result isErrorFor: cls selector: s) ifTrue: [(d at: #errors) add: {cls . s}]]. (t at: #errors) do: [:s | (result isPassedFor: cls selector: s) ifTrue: [(d at: #passed) add: {cls . s}]. (result isFailureFor: cls selector: s) ifTrue: [(d at: #failures) add: {cls . s}]]]]. string := String streamContents: [:str| str nextPutAll: '----------------'; cr. str nextPutAll: 'Diff between current result and saved result'; cr. str nextPutAll: 'New passed: '. (d at: #passed) do: [:s| str nextPutAll: s printString, ' ']. str cr. str nextPutAll: 'New failures: '. (d at: #failures) do: [:s| str nextPutAll: s printString, ' ']. str cr. str nextPutAll: 'New errors: '. (d at: #errors) do: [:s| str nextPutAll: s printString, ' ']. str cr]. Workspace new contents: string; openLabel: 'SUnit Progress' string. ! Item was changed: ----- Method: TestRunner>>excludeClassesNotUnderTestFrom: (in category 'actions') ----- excludeClassesNotUnderTestFrom: methods + - | theClass | classesSelected do: [ :class | (class class includesSelector: #classNamesNotUnderTest) ifTrue: [ class classNamesNotUnderTest do: + [ :className | | theClass | - [ :className | theClass := Smalltalk classNamed: className. theClass ifNotNil:[ theClass methods do: [ :each | methods remove: each methodReference ifAbsent: [ ] ]. theClass class methods do: [ :each | methods remove: each methodReference ifAbsent: [ ] ]] ] ] ]! |
Free forum by Nabble | Edit this page |