aboutsummaryrefslogtreecommitdiffstats
path: root/tools/node_modules/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js')
-rw-r--r--tools/node_modules/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/node_modules/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js b/tools/node_modules/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js
new file mode 100644
index 0000000..3f3eb8c
--- /dev/null
+++ b/tools/node_modules/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/jsUnitTestSuite.js
@@ -0,0 +1,44 @@
+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');
+}
+