[pypy-commit] cffi default: Add a missing test

arigo noreply at buildbot.pypy.org
Sun Aug 12 17:31:15 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r813:75c275ffd118
Date: 2012-08-12 16:09 +0200
http://bitbucket.org/cffi/cffi/changeset/75c275ffd118/

Log:	Add a missing test

diff --git a/testing/backend_tests.py b/testing/backend_tests.py
--- a/testing/backend_tests.py
+++ b/testing/backend_tests.py
@@ -871,6 +871,7 @@
         assert ffi.cast("enum foo", "A") != ffi.cast("enum bar", "A")
         assert ffi.cast("enum bar", "A") != ffi.cast("int", 0)
         assert repr(ffi.cast("enum bar", "CC")) == "<cdata 'enum bar' 'CC'>"
+        py.test.raises(ValueError, ffi.cast, "enum bar", "UNKNOWN")
 
     def test_enum_in_struct(self):
         ffi = FFI(backend=self.Backend())


More information about the pypy-commit mailing list