[squeak-dev] The Inbox: SUnitTools-jr.9.mcz
Jakob Reschke
jakres+squeak at gmail.com
Sat Jul 16 16:58:35 UTC 2022
The diff in this notification email is wrong. I just added these:
Item was added:
+ ----- Method: Lexicon>>testDebugTest (in category '*SUnitTools-message
list functions') -----
+ testDebugTest
+ | case selector cls |
+ cls := self targetClass ifNil: [^ self].
+ selector := self selectedMessageName ifNil: [^ self].
+ case := cls selector: selector.
+
+ case debugAsFailure.!
Item was added:
+ ----- Method: Lexicon>>testRunTest (in category '*SUnitTools-message list
functions') -----
+ testRunTest
+ | suite |
+ suite := self targetClass selector: self selectedMessageName.
+ self testRunSuite: suite.
+ self changed: #messageList.!
Item was added:
+ ----- Method: Lexicon>>testsMessageListMenu: (in category
'*SUnitTools-menus') -----
+ testsMessageListMenu: aMenu
+ (self targetClass isTestClass
+ and: [self targetClass isAbstract not
+ and: [self targetClass allTestSelectors includes: self
selectedMessageName]])
+ ifFalse: [^ aMenu].
+ ^ aMenu addList: #(
+ -
+ ('run test' testRunTest)
+ ('debug test' testDebugTest));
+ yourself!
Am Sa., 16. Juli 2022 um 18:41 Uhr schrieb <commits at source.squeak.org>:
> A new version of SUnitTools was added to project The Inbox:
> http://source.squeak.org/inbox/SUnitTools-jr.9.mcz
>
> ==================== Summary ====================
>
> Name: SUnitTools-jr.9
> Author: jr
> Time: 16 July 2022, 6:41:00.785653 pm
> UUID: 81d39fe4-b439-6a46-a0e9-0c922caf0dba
> Ancestors: SUnitTools-ct.8
>
> Override run test menu items in Lexicon to run tests on the targetClass
> instead of the selectedClass
>
> The selectedClass is the class that defines the selected method. The
> targetClass is the browsed class in the Lexicon. This makes a difference
> for test methods if the selected method is inherited from an abstract
> TestCase subclass. In that case, self selectedClass isAbstract answers true
> and the test items were previously not shown. If the browsed class is not
> abstract as well, it can run the selected test method just fine.
>
> This introduces code duplication with the CodeHolder methods with the same
> selectors.
>
> =============== Diff against SUnitTools-ct.8 ===============
> [...]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220716/3492c2d8/attachment.html>
More information about the Squeak-dev
mailing list
|