/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js
JavaScript | 44 lines | 36 code | 8 blank | 0 comment | 2 complexity | 3fd174549cb24cf919e448c1f3e60aa6 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
- function jsUnitTestSuite() {
- this.isjsUnitTestSuite = true;
- this.testPages = Array();
- this.pageIndex = 0;
- }
-
- jsUnitTestSuite.prototype.addTestPage = function (pageName)
- {
- this.testPages[this.testPages.length] = pageName;
- }
-
- jsUnitTestSuite.prototype.addTestSuite = function (suite)
- {
- for (var i = 0; i < suite.testPages.length; i++)
- this.addTestPage(suite.testPages[i]);
- }
-
- jsUnitTestSuite.prototype.containsTestPages = function ()
- {
- return this.testPages.length > 0;
- }
-
- jsUnitTestSuite.prototype.nextPage = function ()
- {
- return this.testPages[this.pageIndex++];
- }
-
- jsUnitTestSuite.prototype.hasMorePages = function ()
- {
- return this.pageIndex < this.testPages.length;
- }
-
- jsUnitTestSuite.prototype.clone = function ()
- {
- var clone = new jsUnitTestSuite();
- clone.testPages = this.testPages;
- return clone;
- }
-
- if (xbDEBUG.on)
- {
- xbDebugTraceObject('window', 'jsUnitTestSuite');
- }
-