[squeak-dev] The Trunk: SUnit-cmm.97.mcz

Frank Shearar frank.shearar at gmail.com
Fri Nov 8 16:29:02 UTC 2013


On 8 November 2013 16:24,  <commits at source.squeak.org> wrote:
> Chris Muller uploaded a new version of SUnit to project The Trunk:
> http://source.squeak.org/trunk/SUnit-cmm.97.mcz
>
> ==================== Summary ====================
>
> Name: SUnit-cmm.97
> Author: cmm
> Time: 8 November 2013, 10:24:49.44 am
> UUID: d53f9dfb-5ea8-499e-bb2e-9b76450607cf
> Ancestors: SUnit-fbs.96
>
> Added a test for MessageSend>>#numArgs.
>
> =============== Diff against SUnit-fbs.96 ===============
>
> Item was added:
> + TestCase subclass: #MessageSendTest
> +       instanceVariableNames: ''
> +       classVariableNames: ''
> +       poolDictionaries: ''
> +       category: 'SUnit-Kernel'!
>
> Item was added:
> + ----- Method: MessageSendTest>>testNumArgs (in category 'as yet unclassified') -----
> + testNumArgs
> +       self
> +                assert:
> +                       (MessageSend
> +                               receiver: Dictionary new
> +                               selector: #at:put:) numArgs = 2 ;
> +                assert:
> +                       (MessageSend
> +                               receiver: 3
> +                               selector: #sqrt) numArgs = 0!

I like that you've written tests for this. But (a) I'd rather see
#assert:equals: because its error messages are much better and (b)
this belongs in KernelTests, not SUnit.

frank


More information about the Squeak-dev mailing list