日期:2014-05-16 浏览次数:20326 次
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>测试网页</title> </head> <!-- 导入jsunit核心库和被测函数 --> <script type="text/javascript" src="../js/jsUnitCore.js"></script> <script type="text/javascript" src="../js/jsunitDemo.js"></script> <script type="text/javascript"> //测试函数 function testDemo(){ // assertEquals("demo(2,2)test",0,demo(2,2)); // assertEquals("demo(1,2)test",1,demo(1,2)); // assertEquals("demo(2,1)test",-1,demo(2,1)); assertEquals("demo(2,1)test",5,demo(2,1)); // assertEquals("demo(地方,阿道夫)test",-1,demo(地方,阿道夫)); } </script> <body> </body>