Commits

Armin Rigo committed a964b08

Bah, to fix this test it's actually enough to add parentheses
around the C declaration.

  • Participants
  • Parent commits 5614459
  • Branches cpy-extension

Comments (0)

Files changed (2)

File cffi/verifier.py

                 # accept all integers, but complain on float or double
                 prnt('  (p->%s) << 1;' % fname)
             else:
-                # only accept exactly the type declared
+                # only accept exactly the type declared.  Note the parentheses
+                # around the '*tmp' below.  In most cases they are not needed
+                # but don't hurt --- except test_struct_array_field.
                 prnt('  { %s = &p->%s; }' % (
-                    ftype.get_c_name(' *tmp'), fname))
+                    ftype.get_c_name('(*tmp)'), fname))
         prnt('}')
         prnt()
 

File testing/test_verify.py

             _check_field_match(typename, real, expect_mismatch=True)
 
 def test_struct_array_field():
-    py.test.skip("in-progress")
     ffi = FFI()
     ffi.cdef("struct foo_s { int a[17]; ...; };")
     ffi.verify("struct foo_s { int x; int a[17]; int y; };")