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

santagada at codespeak.net santagada at codespeak.net
Fri Jan 12 15:54:30 CET 2007


Author: santagada
Date: Fri Jan 12 15:53:56 2007
New Revision: 36581

Modified:
   pypy/dist/pypy/lang/js/test/test_interp.py
Log:
multiple assignment "x = z =y" working... for free!

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	Fri Jan 12 15:53:56 2007
@@ -336,6 +336,10 @@
 
     def test_typeof(self):
         py.test.skip(" TODO: needed for mozilla test suite")
+        self.assert_prints("""
+        var x = 3
+        typeof x ==
+        """)
     
     def test_switch(self):
         py.test.skip(" TODO: needed for mozilla test suite")
@@ -369,6 +373,12 @@
         print(!x)
         print(!!x)""", ["true", "false"])
 
+    def test_equals(self):
+        self.assert_prints("""
+        var x = 5;
+        y = z = x
+        print(y)""", ["5"])
+        
     def test_smallthings(self):
         py.test.skip(" TODO: needed for mozilla test suite")
         x = """
@@ -382,4 +392,3 @@
             return ( Number.NaN );"""
         x = "Number.POSITIVE_INFINITY Number.NEGATIVE_INFINITY" 
         x = "Math.floor( Math.abs( t ) ) );"
-        x = "this.orig.werror = this.werror = false;"
\ No newline at end of file



More information about the Pypy-commit mailing list