[pypy-svn] r29166 - pypy/dist/pypy/translator/js/modules/test

fijal at codespeak.net fijal at codespeak.net
Thu Jun 22 19:39:21 CEST 2006


Author: fijal
Date: Thu Jun 22 19:39:20 2006
New Revision: 29166

Modified:
   pypy/dist/pypy/translator/js/modules/test/test_xmlhttp.py
Log:
Added two way proxy.


Modified: pypy/dist/pypy/translator/js/modules/test/test_xmlhttp.py
==============================================================================
--- pypy/dist/pypy/translator/js/modules/test/test_xmlhttp.py	(original)
+++ pypy/dist/pypy/translator/js/modules/test/test_xmlhttp.py	Thu Jun 22 19:39:20 2006
@@ -16,4 +16,13 @@
     result = fn()
     assert result == 3
 
-#def test_proxy_double_side
+def reply_fun(data):
+    ProxyRootInstance.send_result(str(data['eight']), "", empty_fun)
+
+def test_proxy_double_side():
+    def run_double_proxy():
+        ProxyRootInstance.return_eight(reply_fun)
+    
+    fn = compile_function(run_double_proxy, [], root = ProxyRoot)
+    result = fn()
+    assert result == 8



More information about the Pypy-commit mailing list