[pypy-commit] lang-js default: more jit view tests

stepahn noreply at buildbot.pypy.org
Fri Feb 15 14:10:02 CET 2013


Author: Stephan <stephan at stzal.com>
Branch: 
Changeset: r352:723ba8f60958
Date: 2013-02-15 14:09 +0100
http://bitbucket.org/pypy/lang-js/changeset/723ba8f60958/

Log:	more jit view tests

diff --git a/test/jit_view.py b/test/jit_view.py
--- a/test/jit_view.py
+++ b/test/jit_view.py
@@ -106,6 +106,22 @@
 
         self.run(code, 100)
 
+    def test_func_call_multiple_args(self):
+        code = """
+        (function () {
+            var i = 0;
+            function f(a, b) {
+                return a + b;
+            }
+            while(i < 100) {
+                i = f(i, 1);
+            }
+            return i;
+        })();
+        """
+
+        self.run(code, 100)
+
     def test_double_func_call_in_loop(self):
         code = """
         (function () {
@@ -222,3 +238,18 @@
         """
 
         self.run(code, 1)
+
+    def test_str_concat(self):
+        code = """
+        (function () {
+            var i = 0;
+            var j = '';
+            while(i < 10) {
+                i += 1;
+                j += 'a';
+            }
+            return j;
+        })();
+        """
+
+        self.run(code, 'aaaaaaaaaa')


More information about the pypy-commit mailing list