[pypy-commit] creflect default: Test that "const int" also work with #defines

arigo noreply at buildbot.pypy.org
Tue Nov 18 17:41:33 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r73:91a86160c338
Date: 2014-11-18 17:41 +0100
http://bitbucket.org/cffi/creflect/changeset/91a86160c338/

Log:	Test that "const int" also work with #defines

diff --git a/test/codegen/glob-003b.c b/test/codegen/glob-003b.c
--- a/test/codegen/glob-003b.c
+++ b/test/codegen/glob-003b.c
@@ -1,4 +1,8 @@
-int const ab = 42;
+const int ab;
+
+# ____________________________________________________________
+
+#define ab 42
 
 # ____________________________________________________________
 
diff --git a/test/test_cgcompile.py b/test/test_cgcompile.py
--- a/test/test_cgcompile.py
+++ b/test/test_cgcompile.py
@@ -25,7 +25,7 @@
     f.write('#define TESTFN(cb) test%s(cb)\n' % (basename.replace('-','_'),))
     f.write('\n')
     for line in inputlines:
-        if not line.startswith('#') or line.startswith('#include'):
+        if not (line.startswith('# ') or line.startswith('#expect')):
             f.write(line)
     f.write('\n')
     f.write('#include "%s/../cgcompile.c"\n' % path)


More information about the pypy-commit mailing list