Perhaps this is a bug report - the seperation of bug
elimination and feature addition is fuzzy.
Anyway, I noticed things like
Vector(0, 1).Must == Vector(0, 0)
would pass!
So, anyway, my request is that either these never pass,
or it uses boo's handy duck typing and calls the proper
operator. Preferably the latter. At the moment I have
to write:
(Vector(0,1) == Vector(0, 0)).Must.BeTrue()
Logged In: YES
user_id=1121923
This is a bug. ObjectMust does not overload the "=="
operator. I'm not sure if "op_Equality(EquatableMust,
object)" would be called by the compiler for classes that
inherit from object. An easier solution may be to use
the "specify" macro to rewrite the "==" binary expression
as a call to ".Equal" instead. I may have to wait until
Generics come to Boo so I can do a typesafe "==" operator.
For now you can call Equal e.g.
Vector(0, 1).Must.Equal(Vector(0,0)) # will throw exception
More thoughts:
(Vector(0,1) == Vector(0, 0)).Must... will test your own
operator overload if you've implemented one.
Whereas .Equal will call the Equals method on your object.
These should behave the same - but it's good to specify
that fact.