Author: Armin Rigo <[email protected]>
Branch:
Changeset: r510:7702269d8ee8
Date: 2012-06-25 17:01 +0200
http://bitbucket.org/cffi/cffi/changeset/7702269d8ee8/
Log: Test
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -555,6 +555,13 @@
assert s.a1 == 123
assert s.a2 == 456
assert s.a3 == 0
+ #
+ s = newp(BStructPtr, {'a2': 41122, 'a3': -123})
+ assert s.a1 == 0
+ assert s.a2 == 41122
+ assert s.a3 == -123
+ #
+ py.test.raises(KeyError, newp, BStructPtr, {'foobar': 0})
def test_array_in_struct():
BInt = new_primitive_type("int")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit