David T. Lewis uploaded a new version of SUnitTools to project The Trunk:
http://source.squeak.org/trunk/SUnitTools-tcj.4.mcz==================== Summary ====================
Name: SUnitTools-tcj.4
Author: tcj
Time: 9 June 2018, 12:55:17.485052 pm
UUID: 9f8d6f94-46c6-4bb1-884d-1d0e66fd5b62
Ancestors: SUnitTools-mt.3
Fixes use of 'find tested item' on TestCase subclasses whose name end in 'Tests' rather than 'Test'. This opens up 'find tested item' to work on 24 additional TestCase subclasses where it would not have worked before. It should result in only one false positive (LongTestCaseTestUnderTest) which will silently fail to locate, as designed
=============== Diff against SUnitTools-mt.3 ===============
Item was changed:
----- Method: CodeHolder>>testFindTested (in category '*SUnitTools-running') -----
testFindTested
+ | cls classNameParts destClassName destMessage |
- | cls destClassName destMessage |
cls := self selectedClass ifNil: [^ self].
cls isTestClass ifFalse: [" already there " ^ self].
+
+ classNameParts := cls name asString piecesCutWhere: [:a :b | b isUppercase].
+ destClassName := (classNameParts last beginsWith: 'Test')
+ ifTrue: [classNameParts allButLast join]
-
- destClassName := (cls name asString endsWith: 'Test')
- ifTrue: [cls name asString allButLast: 4]
ifFalse: [^ self].
destMessage := self selectedMessageName ifNotNil: [:selector | | messageName |
messageName := selector asString.
(messageName beginsWith: 'test') "operate on test methods only"
ifTrue: [ (self class environment classNamed: destClassName)
ifNotNil: [:destClass | destClass selectors
detect: [:destSelector | (self testSelectorFrom: destSelector) = messageName]
ifNone: [nil]]]
ifFalse: [nil]].
self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage
+ !
-
-
- !