Skip to content
Snippets Groups Projects
Commit 330013c6d0c3 authored by Jean-Sebastien Bevilacqua's avatar Jean-Sebastien Bevilacqua
Browse files

Add test for binary operation in enum definition

parent 5e9d6a26b6b1
Branches branch/binary_enum
Tags
No related merge requests found
......@@ -386,10 +386,10 @@
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
......@@ -390,9 +390,10 @@
""")
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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment