PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 4ms RepoModel.GetById 37ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 44 lines | 36 code | 8 blank | 0 comment | 2 complexity | 3fd174549cb24cf919e448c1f3e60aa6 MD5 | raw file
 1function jsUnitTestSuite() {
 2    this.isjsUnitTestSuite = true;
 3    this.testPages = Array();
 4    this.pageIndex = 0;
 5}
 6
 7jsUnitTestSuite.prototype.addTestPage = function (pageName)
 8{
 9    this.testPages[this.testPages.length] = pageName;
10}
11
12jsUnitTestSuite.prototype.addTestSuite = function (suite)
13{
14    for (var i = 0; i < suite.testPages.length; i++)
15        this.addTestPage(suite.testPages[i]);
16}
17
18jsUnitTestSuite.prototype.containsTestPages = function ()
19{
20    return this.testPages.length > 0;
21}
22
23jsUnitTestSuite.prototype.nextPage = function ()
24{
25    return this.testPages[this.pageIndex++];
26}
27
28jsUnitTestSuite.prototype.hasMorePages = function ()
29{
30    return this.pageIndex < this.testPages.length;
31}
32
33jsUnitTestSuite.prototype.clone = function ()
34{
35    var clone = new jsUnitTestSuite();
36    clone.testPages = this.testPages;
37    return clone;
38}
39
40if (xbDEBUG.on)
41{
42    xbDebugTraceObject('window', 'jsUnitTestSuite');
43}
44