It is true that there is an arbitrary sorting behind, but it hasn't bothered me so
far.
Alexandre
On 28 Sep 2011, at 16:53, Chris Cunningham <cunningham.cb(a)gmail.com> wrote:
On Wed, Sep 28, 2011 at 6:32 AM, Alexandre Bergel
<alexandre.bergel(a)me.com> wrote:
Hi!
Mondrian has the method sortedAs:. Here is a test:
self assert: (#(5 4 3 2 1) sortedAs: #odd) asArray = #(5 1 3 4 2).
That's an odd test. It obviously assumes a specific sorting mechanism
behind the scenes to get the 5 3 1 resorted into 5 1 3 on the output.
Is there a better to way test the results? Just that there isn't an
odd before the even?
It just seems to me that if someone fiddles with the underlying sort
mechanism, the ordering may turn out different - and still be right.
-Chris
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev