diff options
| author | Jean-Sebastien Bevilacqua <realitix@gmail.com> | 2017-03-15 21:10:49 +0100 |
|---|---|---|
| committer | Jean-Sebastien Bevilacqua <realitix@gmail.com> | 2017-03-15 21:10:49 +0100 |
| commit | 3dee179b835b14b8b3053013e5972cecada574c5 (patch) | |
| tree | 121b0adf7a6435a9a8a58e9d972acfed33947a54 | |
| parent | e32d65ffd23ea832ab8db6cf0f72839d7cde4a0a (diff) | |
| download | cffi-binary_enum.tar.gz | |
Add test for binary operation in enum definitionbinary_enum
| -rw-r--r-- | testing/cffi0/test_parsing.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/cffi0/test_parsing.py b/testing/cffi0/test_parsing.py index 02b0f4e..4678983 100644 --- a/testing/cffi0/test_parsing.py +++ b/testing/cffi0/test_parsing.py @@ -386,13 +386,14 @@ def test_const_pointer_to_pointer(): def test_enum(): ffi = FFI() ffi.cdef(""" - enum Enum { POS = +1, TWO = 2, NIL = 0, NEG = -1}; + enum Enum { POS = +1, TWO = 2, NIL = 0, NEG = -1, OP = (POS+TWO)-1}; """) C = ffi.dlopen(None) assert C.POS == 1 assert C.TWO == 2 assert C.NIL == 0 assert C.NEG == -1 + assert C.OP == 2 def test_stdcall(): ffi = FFI() |
