#QUALITY by cg
class: RegressionTests::JavaScriptTestClass
added:
#testForLoop1
#testForLoop2
#testForLoop3
--- a/RegressionTests__JavaScriptTestClass.st Tue Aug 28 13:04:41 2018 +0200
+++ b/RegressionTests__JavaScriptTestClass.st Wed Aug 29 13:16:52 2018 +0200
@@ -6,6 +6,47 @@
/** category: testing **/
/**
+ (new JavaScriptTestClass).testForLoop1()
+ **/
+function testForLoop1() {
+ var sum = 0;
+
+ for (var i=0; i<10; i++) {
+ sum += i;
+ }
+ return sum;
+}
+
+/** category: testing **/
+
+/**
+ (new JavaScriptTestClass).testForLoop2()
+ **/
+function testForLoop2() {
+ for (; ; ) {
+ return 0;
+ }
+ return 1;
+}
+
+/** category: testing **/
+
+/**
+ (new JavaScriptTestClass).testForLoop3()
+ **/
+function testForLoop3() {
+ var i = 0;
+
+ for (; ; ) {
+ if (i == 10) return 0;
+ i++;
+ }
+ return 1;
+}
+
+/** category: testing **/
+
+/**
(new JavaScriptTestClass).testMap1()
**/
function testMap1() {