[squeak-dev] The Trunk: KernelTests-ul.295.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed May 6 20:28:31 UTC 2015


Why not implement Dictionary replace:?

2015-05-06 20:11 GMT+02:00 <commits at source.squeak.org>:

> Levente Uzonyi uploaded a new version of KernelTests to project The Trunk:
> http://source.squeak.org/trunk/KernelTests-ul.295.mcz
>
> ==================== Summary ====================
>
> Name: KernelTests-ul.295
> Author: ul
> Time: 6 May 2015, 2:35:40.628 pm
> UUID: bd2d63b5-9819-4e81-b1e0-d14594c158ad
> Ancestors: KernelTests-ul.294
>
> Fix: Dictionary DNU #replace:
>
> =============== Diff against KernelTests-ul.294 ===============
>
> Item was changed:
>   ----- Method: CompiledMethodComparisonTest>>testHash (in category
> 'tests') -----
>   testHash
>         <timeout: 120>
>
>         | ai |
>         ai := CompiledMethod allInstances.
>         "We assume here that if two CompiledMethods are equal then they
> have the same size and header."
> +       (ai groupBy: [ :method | { method size. method header } ]) values
> +               replace: [ :each | each asArray ];
> -       ((ai
> -               groupBy: [ :method | { method size. method header } ])
> -               replace: [ :each | each asArray ])
>                 do: [ :methods |
>                         1 to: methods size do: [ :i |
>                                 i to: methods size do: [ :j |
>                                         (methods at: i) = (methods at: j)
> ifTrue: [
>                                                 self assert: (methods at:
> i) hash equals: (methods at: i) hash ] ] ] ]
>                 displayingProgress: 'Testing hashes'.
>         self assert: (ai collect: [ :cm | cm hash ] as: Set) size * 2 >=
> ai asSet size!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150506/61b4d2ee/attachment.htm


More information about the Squeak-dev mailing list