|
From: Darren C. <da...@dc...> - 2006-03-25 03:16:50
|
> How about an assertEqualsVerbose function that when it has a failure it
> appends result and expected to the msg. ...
I've done this, using the latest svn. Can I have svn write access (my SF
username is darrencook)? Or let me know who I should send files to.
I'm still having a problem using assertEquals with arrays. See the
function [1] below. The first assert fails with:
csv split of 'ex,why,zed' expected:<ex,why,zed> but was:<ex,why,zed>
The other, more specific, tests all pass.
assertEquals uses ===. What kind of difference it is seeing?!
Darren
[1]
public function testSplits(){
var result:Array=String("ex,why,zed").split(",");
var expected:Array=["ex","why","zed"];
assertEquals("csv split of 'ex,why,zed'",result,expected);
assertEquals("csv split of 'ex,why,zed':types",typeof result,typeof
expected);
assertEquals("csv split of
'ex,why,zed':lengths",result.length,expected.length);
assertEquals("csv split of 'ex,why,zed':[0]",result[0],expected[0]);
assertEquals("csv split of 'ex,why,zed':[1]",result[1],expected[1]);
assertEquals("csv split of 'ex,why,zed':[2]",result[2],expected[2]);
}
|