Author: Armin Rigo <[email protected]>
Branch: stm
Changeset: r51720:539ec3f053ef
Date: 2012-01-24 16:48 +0100
http://bitbucket.org/pypy/pypy/changeset/539ec3f053ef/

Log:    Write down a next test, not implemented so far.

diff --git a/pypy/translator/stm/test/test_transform.py 
b/pypy/translator/stm/test/test_transform.py
--- a/pypy/translator/stm/test/test_transform.py
+++ b/pypy/translator/stm/test/test_transform.py
@@ -185,6 +185,17 @@
                              stm_mode="regular_transaction")
         assert res == 42
 
+def test_setfield_freshly_allocated():
+    py.test.skip("XXX not implemented")
+    S = lltype.GcStruct('S', ('x', lltype.Signed))
+    def func(n):
+        p = lltype.malloc(S)
+        p.x = n
+    interp, graph = get_interpreter(func, [42])
+    transform_graph(graph)
+    assert summary(graph) == {'malloc': 1, 'setfield': 1}
+    res = eval_stm_graph(interp, graph, [42], stm_mode="regular_transaction")
+
 def test_unsupported_operation():
     def func(n):
         n += 1
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to