皇家方舟

junit数组比较

以下断言只是对整型数组进行比较,如需其它数据类型的比较则只需修改相应的数据类型;
/**
  * Asserts that two int arrays are equal. If they are not an
  * AssertionFailedError is thrown.
  */
 static public void assertEquals(int[] expected, int[] actual )
 {
  for(int i = 0; i < expected.length; i++)
  {
   assertEquals(null, expected[i], actual[i]);
  }
 }


posted on 2006-09-18 17:30 阿辉 阅读(854) 评论(0)  编辑  收藏 所属分类: junit


只有注册用户登录后才能发表评论。


网站导航:
 

My Links

Blog Stats

常用链接

留言簿(1)

随笔分类

随笔档案

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜