- 授权协议: 未知
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: http://jsunity.com/
- 软件文档: http://code.google.com/p/jsunity/wiki/Documentation
软件介绍
jsUnity 是一个轻量级的上下文无关的 JavaScript测试框架,本身并不依赖浏览器的功能,可以对 JavaScript、JScript、ECMAScript 进行测试。
示例代码:
function sampleTestSuite() {
function setUp() {
jsUnity.log("set up");
}
function tearDown() {
jsUnity.log("tear down");
}
function testLessThan() {
assertTrue(1 < 2);
}
function testPi() {
assertEquals(Math.PI, 22 / 7);
}
}
// optionally wire the log function to write to the context
jsUnity.log = function (s) { document.write(s + "
"); };
// expose the default assertion functions to the current scope
jsUnity.attachAssertions();
var results = jsUnity.run(sampleTestSuite);
// if result is not false,
// access results.total, results.passed, results.failed
高质量程序设计艺术
斯皮内利斯 / 韩东海 / 人民邮电出版社 / 2008-1 / 55.00元
在本书中,作者回归技术层面。从Apache web server、BSD版本的Unix system、ArgoUMl、ACE网络编程库等著名开源软件中选取了大量真实C、C++和java语言源代码,直观而深刻的阐述了代码中可能存在的各种质量问题,涉及可靠性、安全性、时间性和空间性、可移植性、可维护性以及浮点运算等方面,很多内容都市独辟蹊径,发前人所未发。正因如此,本书继作者的《代码阅读》之后在获Jo......一起来看看 《高质量程序设计艺术》 这本书的介绍吧!
