The Inbox: SUnit-ct.121.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: SUnit-ct.121.mcz

commits-2
A new version of SUnit was added to project The Inbox:
http://source.squeak.org/inbox/SUnit-ct.121.mcz

==================== Summary ====================

Name: SUnit-ct.121
Author: ct
Time: 7 December 2019, 3:31:28.823146 pm
UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
Ancestors: SUnit-mt.120

Specify default message category for test selectors. Depends on Kernel-mt.1284.

=============== Diff against SUnit-mt.120 ===============

Item was added:
+ ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
+ defaultCategoryForSelector: aSelector
+
+ aSelector isTestSelector
+ ifTrue: [^ #testing].
+ ^ super defaultCategoryForSelector: aSelector!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

Chris Muller-3
"testing" is for messages that answer booleans.  For example, TestCase>>#shouldPass.

The #test... methods should be categorized differently.

 - Chris


On Sat, Dec 7, 2019 at 8:31 AM <[hidden email]> wrote:
A new version of SUnit was added to project The Inbox:
http://source.squeak.org/inbox/SUnit-ct.121.mcz

==================== Summary ====================

Name: SUnit-ct.121
Author: ct
Time: 7 December 2019, 3:31:28.823146 pm
UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
Ancestors: SUnit-mt.120

Specify default message category for test selectors. Depends on Kernel-mt.1284.

=============== Diff against SUnit-mt.120 ===============

Item was added:
+ ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
+ defaultCategoryForSelector: aSelector
+
+       aSelector isTestSelector
+               ifTrue: [^ #testing].
+       ^ super defaultCategoryForSelector: aSelector!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

Christoph Thiede

'tests'?


Von: Squeak-dev <[hidden email]> im Auftrag von Chris Muller <[hidden email]>
Gesendet: Samstag, 7. Dezember 2019 21:07:59
An: squeak dev
Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
 
"testing" is for messages that answer booleans.  For example, TestCase>>#shouldPass.

The #test... methods should be categorized differently.

 - Chris


On Sat, Dec 7, 2019 at 8:31 AM <[hidden email]> wrote:
A new version of SUnit was added to project The Inbox:
http://source.squeak.org/inbox/SUnit-ct.121.mcz

==================== Summary ====================

Name: SUnit-ct.121
Author: ct
Time: 7 December 2019, 3:31:28.823146 pm
UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
Ancestors: SUnit-mt.120

Specify default message category for test selectors. Depends on Kernel-mt.1284.

=============== Diff against SUnit-mt.120 ===============

Item was added:
+ ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
+ defaultCategoryForSelector: aSelector
+
+       aSelector isTestSelector
+               ifTrue: [^ #testing].
+       ^ super defaultCategoryForSelector: aSelector!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

Chris Muller-3
Yes.

On Sat, Dec 7, 2019 at 2:40 PM Thiede, Christoph <[hidden email]> wrote:

'tests'?


Von: Squeak-dev <[hidden email]> im Auftrag von Chris Muller <[hidden email]>
Gesendet: Samstag, 7. Dezember 2019 21:07:59
An: squeak dev
Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
 
"testing" is for messages that answer booleans.  For example, TestCase>>#shouldPass.

The #test... methods should be categorized differently.

 - Chris


On Sat, Dec 7, 2019 at 8:31 AM <[hidden email]> wrote:
A new version of SUnit was added to project The Inbox:
http://source.squeak.org/inbox/SUnit-ct.121.mcz

==================== Summary ====================

Name: SUnit-ct.121
Author: ct
Time: 7 December 2019, 3:31:28.823146 pm
UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
Ancestors: SUnit-mt.120

Specify default message category for test selectors. Depends on Kernel-mt.1284.

=============== Diff against SUnit-mt.120 ===============

Item was added:
+ ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
+ defaultCategoryForSelector: aSelector
+
+       aSelector isTestSelector
+               ifTrue: [^ #testing].
+       ^ super defaultCategoryForSelector: aSelector!





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

David T. Lewis
In reply to this post by Christoph Thiede
Yes, it should be 'tests'.
   
But don't feel badly about picking the "wrong" category, just have
a look at what all the rest of us have done over the years:
   
   Dictionary withAll: ( { 'testing' . 'Testing' . 'tests' . 'test' }
      collect: [ :cat |
         cat -> (TestCase withAllSubclasses
            select: [ :cls | cls organization categories includes: cat ])]).

Dave


On Sat, Dec 07, 2019 at 08:40:39PM +0000, Thiede, Christoph wrote:

> 'tests'?
>
> ________________________________
> Von: Squeak-dev <[hidden email]> im Auftrag von Chris Muller <[hidden email]>
> Gesendet: Samstag, 7. Dezember 2019 21:07:59
> An: squeak dev
> Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
>
> "testing" is for messages that answer booleans.  For example, TestCase>>#shouldPass.
>
> The #test... methods should be categorized differently.
>
>  - Chris
>
>
> On Sat, Dec 7, 2019 at 8:31 AM <[hidden email]<mailto:[hidden email]>> wrote:
> A new version of SUnit was added to project The Inbox:
> http://source.squeak.org/inbox/SUnit-ct.121.mcz
>
> ==================== Summary ====================
>
> Name: SUnit-ct.121
> Author: ct
> Time: 7 December 2019, 3:31:28.823146 pm
> UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
> Ancestors: SUnit-mt.120
>
> Specify default message category for test selectors. Depends on Kernel-mt.1284.
>
> =============== Diff against SUnit-mt.120 ===============
>
> Item was added:
> + ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
> + defaultCategoryForSelector: aSelector
> +
> +       aSelector isTestSelector
> +               ifTrue: [^ #testing].
> +       ^ super defaultCategoryForSelector: aSelector!
>
>

>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

marcel.taeumel
Yes, it must be 'tests' for the tests in test cases. ;-) Not 'testing'.

Best,
Marcel

Am 07.12.2019 22:06:07 schrieb David T. Lewis <[hidden email]>:

Yes, it should be 'tests'.

But don't feel badly about picking the "wrong" category, just have
a look at what all the rest of us have done over the years:

Dictionary withAll: ( { 'testing' . 'Testing' . 'tests' . 'test' }
collect: [ :cat |
cat -> (TestCase withAllSubclasses
select: [ :cls | cls organization categories includes: cat ])]).

Dave


On Sat, Dec 07, 2019 at 08:40:39PM +0000, Thiede, Christoph wrote:
> 'tests'?
>
> ________________________________
> Von: Squeak-dev im Auftrag von Chris Muller
> Gesendet: Samstag, 7. Dezember 2019 21:07:59
> An: squeak dev
> Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
>
> "testing" is for messages that answer booleans. For example, TestCase>>#shouldPass.
>
> The #test... methods should be categorized differently.
>
> - Chris
>
>
> On Sat, Dec 7, 2019 at 8:31 AM <>> wrote:
> A new version of SUnit was added to project The Inbox:
> http://source.squeak.org/inbox/SUnit-ct.121.mcz
>
> ==================== Summary ====================
>
> Name: SUnit-ct.121
> Author: ct
> Time: 7 December 2019, 3:31:28.823146 pm
> UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
> Ancestors: SUnit-mt.120
>
> Specify default message category for test selectors. Depends on Kernel-mt.1284.
>
> =============== Diff against SUnit-mt.120 ===============
>
> Item was added:
> + ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
> + defaultCategoryForSelector: aSelector
> +
> + aSelector isTestSelector
> + ifTrue: [^ #testing].
> + ^ super defaultCategoryForSelector: aSelector!
>
>

>




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

Christoph Thiede

Oops, I have always been using this wrong name when writing tests ... Thank you!


I need to know what is easier for you: Should I

a) commit again with this commit as ancestor,

b) commit again with latest Trunk commit as ancestor, or

c) don't commit again at all to reduce noise and you can replace this single selector when merging? :)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Sonntag, 8. Dezember 2019 15:54:44
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
 
Yes, it must be 'tests' for the tests in test cases. ;-) Not 'testing'.

Best,
Marcel

Am 07.12.2019 22:06:07 schrieb David T. Lewis <[hidden email]>:

Yes, it should be 'tests'.

But don't feel badly about picking the "wrong" category, just have
a look at what all the rest of us have done over the years:

Dictionary withAll: ( { 'testing' . 'Testing' . 'tests' . 'test' }
collect: [ :cat |
cat -> (TestCase withAllSubclasses
select: [ :cls | cls organization categories includes: cat ])]).

Dave


On Sat, Dec 07, 2019 at 08:40:39PM +0000, Thiede, Christoph wrote:
> 'tests'?
>
> ________________________________
> Von: Squeak-dev im Auftrag von Chris Muller
> Gesendet: Samstag, 7. Dezember 2019 21:07:59
> An: squeak dev
> Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
>
> "testing" is for messages that answer booleans. For example, TestCase>>#shouldPass.
>
> The #test... methods should be categorized differently.
>
> - Chris
>
>
> On Sat, Dec 7, 2019 at 8:31 AM <>> wrote:
> A new version of SUnit was added to project The Inbox:
> http://source.squeak.org/inbox/SUnit-ct.121.mcz
>
> ==================== Summary ====================
>
> Name: SUnit-ct.121
> Author: ct
> Time: 7 December 2019, 3:31:28.823146 pm
> UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
> Ancestors: SUnit-mt.120
>
> Specify default message category for test selectors. Depends on Kernel-mt.1284.
>
> =============== Diff against SUnit-mt.120 ===============
>
> Item was added:
> + ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
> + defaultCategoryForSelector: aSelector
> +
> + aSelector isTestSelector
> + ifTrue: [^ #testing].
> + ^ super defaultCategoryForSelector: aSelector!
>
>

>




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

marcel.taeumel
Hi Christoph,

sure you can update that version in the inbox. Still, i am not so sure about that extension point #defaultCategoryForSelector: you proposed in Kernel-ct.1285...

What are other default categories for selectors (or messages)?

Best,
Marcel

Am 08.12.2019 19:44:31 schrieb Thiede, Christoph <[hidden email]>:

Oops, I have always been using this wrong name when writing tests ... Thank you!


I need to know what is easier for you: Should I

a) commit again with this commit as ancestor,

b) commit again with latest Trunk commit as ancestor, or

c) don't commit again at all to reduce noise and you can replace this single selector when merging? :)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Sonntag, 8. Dezember 2019 15:54:44
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
 
Yes, it must be 'tests' for the tests in test cases. ;-) Not 'testing'.

Best,
Marcel

Am 07.12.2019 22:06:07 schrieb David T. Lewis <[hidden email]>:

Yes, it should be 'tests'.

But don't feel badly about picking the "wrong" category, just have
a look at what all the rest of us have done over the years:

Dictionary withAll: ( { 'testing' . 'Testing' . 'tests' . 'test' }
collect: [ :cat |
cat -> (TestCase withAllSubclasses
select: [ :cls | cls organization categories includes: cat ])]).

Dave


On Sat, Dec 07, 2019 at 08:40:39PM +0000, Thiede, Christoph wrote:
> 'tests'?
>
> ________________________________
> Von: Squeak-dev im Auftrag von Chris Muller
> Gesendet: Samstag, 7. Dezember 2019 21:07:59
> An: squeak dev
> Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
>
> "testing" is for messages that answer booleans. For example, TestCase>>#shouldPass.
>
> The #test... methods should be categorized differently.
>
> - Chris
>
>
> On Sat, Dec 7, 2019 at 8:31 AM <>> wrote:
> A new version of SUnit was added to project The Inbox:
> http://source.squeak.org/inbox/SUnit-ct.121.mcz
>
> ==================== Summary ====================
>
> Name: SUnit-ct.121
> Author: ct
> Time: 7 December 2019, 3:31:28.823146 pm
> UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
> Ancestors: SUnit-mt.120
>
> Specify default message category for test selectors. Depends on Kernel-mt.1284.
>
> =============== Diff against SUnit-mt.120 ===============
>
> Item was added:
> + ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
> + defaultCategoryForSelector: aSelector
> +
> + aSelector isTestSelector
> + ifTrue: [^ #testing].
> + ^ super defaultCategoryForSelector: aSelector!
>
>

>




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

Christoph Thiede

Hi Marcel,


you're right, there are few scenarios where you could need #defaultCategoryForSelector:. However, I think TestCase is a good example that would be even worth this change if it was the only implementor. If I remember how often I created a test class in my Squeak life and created the tests category manually ...


We could even say:


TestCase class >> defaultCategoryForSelector: aSelector
       aSelector isTestSelector
               ifTrue: [^ #testing].
       (aSelector beginsWithAnyOf: #('assert deny should'))
               ifTrue: [^ #assertions].
       ^ super defaultCategoryForSelector: aSelector!

Another example is a builder class I created recently. Similar to TestCase, each subclass includes a lot of #buildFoo, #buildBar, ... methods that are executed programmatically. I would like to override #defaultCategoryForSelector: here again to specify the category #'building' for those methods.


Hypothetically, you could even define rules like:


ClassDescription >> defaultCategoryForSelector: aSelector
((aSelector beginsWith: 'as') and: [aSelector at: 3 ifPresent: #isUppercase ifAbsent: [false]])
ifTrue: [^ #converting].
^ nil

Just some thoughts :)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 9. Dezember 2019 10:18:24
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
 
Hi Christoph,

sure you can update that version in the inbox. Still, i am not so sure about that extension point #defaultCategoryForSelector: you proposed in Kernel-ct.1285...

What are other default categories for selectors (or messages)?

Best,
Marcel

Am 08.12.2019 19:44:31 schrieb Thiede, Christoph <[hidden email]>:

Oops, I have always been using this wrong name when writing tests ... Thank you!


I need to know what is easier for you: Should I

a) commit again with this commit as ancestor,

b) commit again with latest Trunk commit as ancestor, or

c) don't commit again at all to reduce noise and you can replace this single selector when merging? :)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Sonntag, 8. Dezember 2019 15:54:44
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
 
Yes, it must be 'tests' for the tests in test cases. ;-) Not 'testing'.

Best,
Marcel

Am 07.12.2019 22:06:07 schrieb David T. Lewis <[hidden email]>:

Yes, it should be 'tests'.

But don't feel badly about picking the "wrong" category, just have
a look at what all the rest of us have done over the years:

Dictionary withAll: ( { 'testing' . 'Testing' . 'tests' . 'test' }
collect: [ :cat |
cat -> (TestCase withAllSubclasses
select: [ :cls | cls organization categories includes: cat ])]).

Dave


On Sat, Dec 07, 2019 at 08:40:39PM +0000, Thiede, Christoph wrote:
> 'tests'?
>
> ________________________________
> Von: Squeak-dev im Auftrag von Chris Muller
> Gesendet: Samstag, 7. Dezember 2019 21:07:59
> An: squeak dev
> Betreff: Re: [squeak-dev] The Inbox: SUnit-ct.121.mcz
>
> "testing" is for messages that answer booleans. For example, TestCase>>#shouldPass.
>
> The #test... methods should be categorized differently.
>
> - Chris
>
>
> On Sat, Dec 7, 2019 at 8:31 AM <>> wrote:
> A new version of SUnit was added to project The Inbox:
> http://source.squeak.org/inbox/SUnit-ct.121.mcz
>
> ==================== Summary ====================
>
> Name: SUnit-ct.121
> Author: ct
> Time: 7 December 2019, 3:31:28.823146 pm
> UUID: 56da0773-e6ce-8d44-9496-57eea4253f3f
> Ancestors: SUnit-mt.120
>
> Specify default message category for test selectors. Depends on Kernel-mt.1284.
>
> =============== Diff against SUnit-mt.120 ===============
>
> Item was added:
> + ----- Method: TestCase class>>defaultCategoryForSelector: (in category 'organization') -----
> + defaultCategoryForSelector: aSelector
> +
> + aSelector isTestSelector
> + ifTrue: [^ #testing].
> + ^ super defaultCategoryForSelector: aSelector!
>
>

>




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SUnit-ct.121.mcz

Christoph Thiede
In reply to this post by commits-2
The dependency is wrong; this commit depends on *Kernel-ct.1285* instead.



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Carpe Squeak!