[squeak-dev] The Inbox: SUnitTools-jr.5.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Mar 7 13:31:04 UTC 2020
Nice idea, even though you forget to have the message #translated :-)
What is the reason to use ClassBuilder instead of #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:?
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Donnerstag, 5. März 2020 21:53:02
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: SUnitTools-jr.5.mcz
A new version of SUnitTools was added to project The Inbox:
http://source.squeak.org/inbox/SUnitTools-jr.5.mcz
==================== Summary ====================
Name: SUnitTools-jr.5
Author: jr
Time: 5 March 2020, 9:53:04.92876 pm
UUID: 612a0a0e-43fa-de40-8370-f5e90d767232
Ancestors: SUnitTools-tcj.4
Allow to create a new test class immediately if none is found.
=============== Diff against SUnitTools-tcj.4 ===============
Item was added:
+ ----- Method: CodeHolder>>testAskToCreateNewTest: (in category '*SUnitTools-running') -----
+ testAskToCreateNewTest: className
+ (self confirm: 'Test class not found. Create one?') ifFalse: [^ false].
+ (ClassBuilder new)
+ name: className asSymbol
+ inEnvironment: self selectedClass environment
+ subclassOf: TestCase
+ type: #normal
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category:
+ ((self selectedClass category includes: $-)
+ ifTrue: [((self selectedClass category copyUpToLast: $-), '-Tests')]
+ ifFalse: [(self selectedClass category, 'Tests')]) asSymbol.
+ ^ true!
Item was changed:
----- Method: CodeHolder>>testBrowseClassNamed:possibleMessageNamed: (in category '*SUnitTools-running') -----
testBrowseClassNamed: aClassName possibleMessageNamed: aMessageName
| cls selector |
+ (self class environment hasClassNamed: aClassName) ifFalse:
+ [(self testAskToCreateNewTest: aClassName) ifFalse: [^ self]].
- (self class environment hasClassNamed: aClassName) ifFalse: ["no dice" ^ self].
cls := self class environment classNamed: aClassName.
(aMessageName notNil and: [cls includesLocalSelector: (selector := aMessageName asSymbol)])
ifTrue: [ToolSet browse: cls selector: selector]
ifFalse: [ToolSet browseClass: cls].!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200307/263aa285/attachment.html>
More information about the Squeak-dev
mailing list
|