[squeak-dev] The Trunk: SUnitGUI-ct.92.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 8 14:45:58 UTC 2022
Christoph Thiede uploaded a new version of SUnitGUI to project The Trunk:
http://source.squeak.org/trunk/SUnitGUI-ct.92.mcz
==================== Summary ====================
Name: SUnitGUI-ct.92
Author: ct
Time: 8 June 2022, 4:45:47.033837 pm
UUID: 860f8009-e951-3b4d-bdc6-4968e88dc980
Ancestors: SUnitGUI-mt.91
Avoids redundant information ('No methods found for coverage analysis.') when canceling the package selection dialog in the TestRunner after pressing "Run Coverage". Also improves multilingual support and migrates to new UIManager entrypoint.
=============== Diff against SUnitGUI-mt.91 ===============
Item was changed:
----- Method: TestRunner>>promptForPackages (in category 'actions') -----
promptForPackages
+ | packages selectedPackage |
- | packages |
packages := (PackageOrganizer default packages
reject: [:package | (package packageName beginsWith: 'Kernel')
or: [(package packageName beginsWith: 'Collections')
or: [(package packageName beginsWith: 'Exceptions')
or: [(package packageName beginsWith: 'SUnit')
or: [(package packageName beginsWith: 'System')
or: [package packageName includesSubstring: 'Test' caseSensitive: false]]]]]])
sort: [:a :b | a packageName < b packageName].
+ selectedPackage := Project uiManager
+ chooseFrom: (packages collect: [:package | package packageName])
+ values: packages
+ title: 'Select Package' translated.
+ selectedPackage ifNil: [^ nil].
+ packages := Array with: selectedPackage.
- packages := Array
- with: (UIManager default
- chooseFrom: (packages
- collect: [:package | package packageName])
- values: packages
- title: 'Select Package').
^ packages!
Item was changed:
----- Method: TestRunner>>runCoverage (in category 'actions') -----
runCoverage
| packages methods |
packages := Set new.
self addDeclaredPackagesUnderTestTo: packages.
packages isEmpty ifTrue:
+ [ packages := self promptForPackages ifNil: [^ self] ].
- [ packages := self promptForPackages ].
methods := OrderedCollection new.
self
addMethodsUnderTestIn: packages
to: methods.
self excludeClassesNotUnderTestFrom: methods.
methods isEmpty ifTrue:
+ [ ^ Project uiManager inform: 'No methods found for coverage analysis.' translated ].
+ self collectCoverageFor: methods.!
- [ ^ UIManager default inform: 'No methods found for coverage analysis.' ].
- self collectCoverageFor: methods
- !
More information about the Squeak-dev
mailing list
|