Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1083:32cad3360765
Date: 2012-11-30 12:16 -0800
http://bitbucket.org/cffi/cffi/changeset/32cad3360765/

Log:    A test that passes

diff --git a/testing/backend_tests.py b/testing/backend_tests.py
--- a/testing/backend_tests.py
+++ b/testing/backend_tests.py
@@ -1473,3 +1473,12 @@
         p = ffi.new("foo_t *")
         a = ffi.addressof(p[0])
         assert a == p
+
+    def test_multiple_independent_structs(self):
+        ffi1 = FFI(); ffi1.cdef("struct foo { int x; };")
+        ffi2 = FFI(); ffi2.cdef("struct foo { int y, z; };")
+        foo1 = ffi1.new("struct foo *", [10])
+        foo2 = ffi2.new("struct foo *", [20, 30])
+        assert foo1.x == 10
+        assert foo2.y == 20
+        assert foo2.z == 30
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to