|
From: Darren C. <da...@dc...> - 2006-03-29 08:40:07
|
>>assertEquals should probably be extended to handle a few extra types (for >>ex, Array and XML). assertSame tests if the two arguments are the same >>object, while assertEquals is more concerned with the value. > > I agree. Instead of special code for XML, why not special code for all > objects that do not have an equals function defined? I've gone ahead and done this, for all types of objects. See the Assert.as file in the zip file attached to the other email I just sent. Warning: it is backwards-incompatible if you've used assertEquals to compare objects/arrays when you really intended to do what assertSame does. Apologies if "fix your code" sounds too harsh :-). Darren |