Fixed syntax error in JavaScriptTests>>testTryFinally03 jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 20 Aug 2016 08:05:58 +0100
branchjv
changeset 1533 94753c163f85
parent 1532 c540e1f444ea
child 1535 75fed93d5756
Fixed syntax error in JavaScriptTests>>testTryFinally03
RegressionTests__JavaScriptTests.st
--- a/RegressionTests__JavaScriptTests.st	Sun Sep 04 03:30:26 2016 +0100
+++ b/RegressionTests__JavaScriptTests.st	Sat Aug 20 08:05:58 2016 +0100
@@ -508,31 +508,31 @@
     savedTranscript := Smalltalk at:#Transcript.
     [
 	Smalltalk at:#Transcript put:(collector := '' writeStream).
-        self 
-            execute:'
-                      testComments() {
-                          // Unicode is allowed in comments
-                          // This is a comment \u0410\u0406\u0414\u0419
-                          /* Another comment \u05D0\u2136\u05d3\u05d7 */
-
-                          /**/ // Tiny comment
-                          /***/ // Also valid
-
-                          // Need to test string literals and identifiers
+	self
+	    execute:'
+		      testComments() {
+			  // Unicode is allowed in comments
+			  // This is a comment \u0410\u0406\u0414\u0419
+			  /* Another comment \u05D0\u2136\u05d3\u05d7 */
+
+			  /**/ // Tiny comment
+			  /***/ // Also valid
+
+			  // Need to test string literals and identifiers
 			  println("All is well in Javascript");
-                          return null;
-                      }
-                     '
-            for:JavaScriptEnvironment new
-            arguments:#(  )
-            expect:nil
+			  return null;
+		      }
+		     '
+	    for:JavaScriptEnvironment new
+	    arguments:#(  )
+	    expect:nil
     ] ensure:[
 	Smalltalk at:#Transcript put:savedTranscript
     ].
 
     expected := String streamContents:[:s | s showCR:'All is well in Javascript'].
     self assert:(collector contents = expected).
-    
+
     "
      self run:#testComments01
      self new testComments01
@@ -981,22 +981,22 @@
     savedTranscript := Smalltalk at:#Transcript.
     [
 	Smalltalk at:#Transcript put:(collector := '' writeStream).
-        self 
-            execute:'test(arg) {
-                        for (var n = 0; n < arg; n++) {
-                            Transcript.showCR(n);
-                        }
-                     }'
-            for:nil
-            arguments:#(5)
-            expect:nil
+	self
+	    execute:'test(arg) {
+			for (var n = 0; n < arg; n++) {
+			    Transcript.showCR(n);
+			}
+		     }'
+	    for:nil
+	    arguments:#(5)
+	    expect:nil
     ] ensure:[
 	Smalltalk at:#Transcript put:savedTranscript
     ].
-    
+
     expected := String streamContents:[:s | 0 to:4 do:[:n | s showCR:n]].
     self assert:(collector contents = expected).
-    
+
     "
      self run:#testFor05
      self new testFor05
@@ -1387,8 +1387,8 @@
     [
 	Smalltalk at:#Transcript put:(collector := '' writeStream).
 
-        self 
-            execute:'
+	self
+	    execute:'
 execute() {
     function foo()
     {
@@ -1447,9 +1447,9 @@
     test();
 }
 '
-            for:nil
-            arguments:#()
-            expect:nil
+	    for:nil
+	    arguments:#()
+	    expect:nil
     ] ensure:[
 	Smalltalk at:#Transcript put:savedTranscript
     ].
@@ -1467,7 +1467,7 @@
 		    s showCR:'bbb'.
 		].
     self assert:(collector contents = expected).
-    
+
     "
      self run:#testVarDeclaration08
      self new testVarDeclaration08
@@ -4950,7 +4950,7 @@
     [
 	Smalltalk at:#Transcript put:(collector := '' writeStream).
 
-        self 
+	self
 	    execute:'
 test(arg) {
     var handlerWasCalled = false;
@@ -4958,15 +4958,15 @@
     function failingMethod() {  return 10 / arg; };
 
     try {
-        failingMethod();
+	failingMethod();
     } catch (Error e) {
-        println(e.description());
-        handlerWasCalled = true;
+	println(e.description());
+	handlerWasCalled = true;
     }
-    return handlerWasCalled;    
+    return handlerWasCalled;
 }'
-            for:JavaScriptEnvironment new
-            arguments:#(0)
+	    for:JavaScriptEnvironment new
+	    arguments:#(0)
 	    expect:true.
     ] ensure:[
 	Smalltalk at:#Transcript put:savedTranscript
@@ -4992,18 +4992,18 @@
     function exceptionRaised() {  handlerWasCalled =  true; };
 
     try {
-        failingMethod();
+	failingMethod();
     } catch (Error e) {
-        exceptionRaised();
+	exceptionRaised();
     } finally {
-        finallyExecuted = true;
+	finallyExecuted = true;
     }
-    return handlerWasCalled && finallyExecuted;    
+    return handlerWasCalled && finallyExecuted;
 }'
-            for:nil
-            arguments:#(0)
+	    for:nil
+	    arguments:#(0)
 	    expect:true.
-    
+
     "
      self run:#testTryCatchFinally01
      self new testTryCatchFinally01
@@ -5016,49 +5016,35 @@
     savedTranscript := Smalltalk at:#Transcript.
     [
 	Smalltalk at:#Transcript put:(collector := '' writeStream).
-        self 
+	self
 	    execute:
 'test(arg) {
     var handlerWasCalled = false;
 
     println("1");
-    try {    
-        function dummy () {
-            println("2a");
-            try {
-                println("2b");
-                return 10 / arg;
-            } finally {
-                println("2c");
-                handlerWasCalled = true;
-            }
-        };
-
-        println("2");
-        dummy();
-        println("3");
+    try {
+	function dummy () {
+	    println("2a");
+	    try {
+		println("2b");
+		return 10 / arg;
+	    } finally {
+		println("2c");
+		handlerWasCalled = true;
+	    }
+	};
+
+	println("2");
+	dummy();
+	println("3");
     } catch(Error);
 
     println("4");
     return handlerWasCalled;
  }'
-            for:JavaScriptEnvironment new
-            arguments:#(0)
-            expect:true
-
-    ] ensure:[
-        Smalltalk at:#Transcript put:savedTranscript
-    ].
-
-    expected := String streamContents:[:s | 
-                    s showCR:'1'.
-                    s showCR:'2'.
-                    s showCR:'2a'.
-                    s showCR:'2b'.
-                    s showCR:'2c'.
-                    s showCR:'4'.
-                ].
-    self assert:(collector contents = expected).
+	    for:JavaScriptEnvironment new
+	    arguments:#(0)
+	    expect:true
 
     ] ensure:[
 	Smalltalk at:#Transcript put:savedTranscript
@@ -5872,4 +5858,3 @@
 version_CVS
     ^ '$Header$'
 ! !
-