[pypy-svn] r40947 - pypy/dist/pypy/lang/js/test

santagada at codespeak.net santagada at codespeak.net
Wed Mar 21 17:00:25 CET 2007


Author: santagada
Date: Wed Mar 21 17:00:23 2007
New Revision: 40947

Modified:
   pypy/dist/pypy/lang/js/test/test_interp.py
Log:
new tests sugested by fijal and guido_w

Modified: pypy/dist/pypy/lang/js/test/test_interp.py
==============================================================================
--- pypy/dist/pypy/lang/js/test/test_interp.py	(original)
+++ pypy/dist/pypy/lang/js/test/test_interp.py	Wed Mar 21 17:00:23 2007
@@ -509,3 +509,34 @@
         for (var arg = "", i = 0; i < 2; i++) { print(i)}
         """, ['0', '1'])
 
+    def test_recursive_call(self):
+        py.test.skip()
+        self.assert_prints("""
+        function f(x) { if (x == 0) { return 1; } else { return f(x-1)*x; }}
+        print(f(3))
+        """, ['6',])
+        
+    def test_recursive_call(self):
+        py.test.skip()
+        self.assert_prints("""
+        function f(x) { if (x == 0) { return 1; } else { return f(x-1)*x; }}
+        print(f(3))
+        """, ['6',])
+    
+    def test_function_prototype(self):
+        py.test.skip()
+        self.assert_prints("""
+        function foo() {}; foo.prototype.bar = function() {}
+        """, ['',])
+
+    def test_function_prototype(self):
+        py.test.skip()
+        self.assert_prints("""
+        function foo() {}; foo.prototype.bar = function() {}
+        """, ['',])
+
+    def test_function_this(self):
+        py.test.skip()
+        self.assert_prints("""
+        function foo() {this.bar = function() {}}; var f = new foo(); f.bar();
+        """, ['',])



More information about the Pypy-commit mailing list