Commit graph

40 commits

Author SHA1 Message Date
Olly Betts
204a5f7bf3 Fix a preprocessor expression evaluation bug
A subexpression in parentheses lost its string/int type flag and
instead used whatever type was left in the stack entry from
previous use.  In practice we mostly got away with this because
most preprocessor expressions are integer, but it could have
resulted in a preprocessor expression incorrectly evaluating as
zero.  If -Wextra was in use you got a warning:

Warning 202: Error: 'Can't mix strings and integers in expression'

Fixes #1384
2022-02-23 18:53:59 +13:00
Olly Betts
860731e0ea Remove redundant test cases
With C++ comments changed to C comments, these are now identical to
the two cases just above, aside from the `2` suffix on the names.

Follow-on for #2027.
2021-12-23 11:55:47 +13:00
William S Fulton
2d76057571 preproc_cpp test for testing preprocessor and C++
Move C++ comment testing into here.
See 7a9bf3307f.
2021-12-22 19:06:00 +00:00
William S Fulton
7a9bf3307f Remove C++ comments from preproc C test
Closes issue #2127
2021-12-21 22:36:42 +00:00
Olly Betts
5f38f9cc78 [Chicken] Remove code for Chicken
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Zackery Spytz
5c19f4de2f [OCaml] Add missing warning filters for OCaml keywords in the test suite 2018-12-31 05:55:10 -07:00
Olly Betts
1915740af8 preproc.i: Also note URL for "// in macro" PR 2018-03-08 06:12:01 +13:00
Olly Betts
ba3773e1be preproc.i: Shorten classname for scilab
Errors were:

../../../../../../Examples/test-suite/scilab/../preproc.i:400: Error: Wrapping functions names for member 'tcxMessageTestSlashSlash.mHeader' will exceed 24 characters, please rename the container of member 'tcxMessageTestSlashSlash'.
../../../../../../Examples/test-suite/scilab/../preproc.i:408: Error: Wrapping functions names for member 'tcxMessageBugSlashSlash.mBid' will exceed 24 characters, please rename the container of member 'tcxMessageBugSlashSlash'.
2018-03-08 06:10:08 +13:00
Olly Betts
d5e012f70f Add test coverage for // comment fix 2018-03-07 14:49:08 +13:00
William S Fulton
d72aca991f preproc testcase warning suppression for bad macro test 2017-10-10 19:26:54 +01:00
Olly Betts
5d14a7d910 Add regression testcase 2017-10-08 09:02:29 +13:00
William S Fulton
902a141540 Fix testcase failure on Node Javascript 2017-08-16 07:56:28 +01:00
William S Fulton
956495dd47 Add testcase for macros with commas in comment 2017-04-27 19:47:29 +01:00
William S Fulton
74f392ce9a Suppress clang warning in testcase
For Octave compiling preproc C test as C++ code:
Suppress: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
2015-02-11 19:29:39 +00:00
William S Fulton
fd80e8d1e0 Modify preproc testcase to remove clang warning
Fix to get rid of:
warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
2015-02-03 18:41:20 +00:00
William S Fulton
93d58cd3ed Fix use of preprocessor null directive
This was broken recently in commit 255c929c56
for issue #217
2014-12-20 17:05:13 +00:00
William S Fulton
94e141cbd0 Warning suppression
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12468 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-17 22:43:28 +00:00
Ian Lance Taylor
2970f53c21 Remove the -rename option in the Go language support. Do a much
better job of checking for name conflicts.  Ignore conflicting names
with a warning.  Adjust the testsuite accordingly.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12135 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-17 18:59:26 +00:00
William S Fulton
bd46f03b6f Fix #2746858 - C macro expression using floating point numbers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11185 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-04-09 17:51:59 +00:00
William S Fulton
7d4916b938 fix macro clash with %mangle in swigmacros.swig so that test can run in c++ mode
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-19 21:06:13 +00:00
Xavier Delacour
4d283f59c3 Fix ~15 tests, minor doc fixes, improve STL support.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10298 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-03-05 04:35:34 +00:00
William S Fulton
d741223959 Add preprocessor bug with trailing backslash
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10161 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-20 21:48:20 +00:00
Olly Betts
1ec0417eb5 Use SWIGPHP instead of SWIGPHP4
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9380 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-29 10:09:23 +00:00
Marcelo Matus
72fd0c51ab fix bug #1060789
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8888 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-24 02:39:24 +00:00
William S Fulton
152f6d18dd simple #warning and #error tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8569 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-26 22:33:34 +00:00
Marcelo Matus
1f244c1398 silence warning with ruby + autorename
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8437 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-14 21:26:36 +00:00
Marcelo Matus
89e7497ac6 add support for named warning codes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8249 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 11:42:24 +00:00
William S Fulton
473da5b297 php keyword fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7869 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-26 08:38:49 +00:00
John Lenz
897e5ad40d Lots more bug fixes for the chicken module: almost the entire test-sutie now runs
The only tests that are failing are ones that depend on std_vector.i and similar


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7079 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-17 07:28:19 +00:00
Marcelo Matus
42f7bb05f6 resolve ruby warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6810 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-01 01:06:33 +00:00
Marcelo Matus
b574e77f6b fix macro with empy args
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6751 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-18 00:25:23 +00:00
Marcelo Matus
4ac505b4d4 added more cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6744 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-16 00:18:32 +00:00
Marcelo Matus
53306bdc3e now 'defined' as variable name is fixed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6573 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-30 21:28:36 +00:00
Marcelo Matus
75ec2bf503 patch for 'defined' varible not ready jet
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6571 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-30 13:04:08 +00:00
Marcelo Matus
d83ec6779b fix cpp + defined variable name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6569 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-30 12:14:42 +00:00
William S Fulton
20fc761449 ruby warning suppression
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6547 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-29 21:13:29 +00:00
Marcelo Matus
37cffe5a32 add more cases from bug reports
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6377 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-08 09:16:53 +00:00
Marcelo Matus
97f01d158f add __cplusplus case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 08:37:55 +00:00
Marcelo Matus
503c615c67 add test for the mangling extension #@ preproc.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5757 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 09:44:35 +00:00
Dave Beazley
da53ad7bf2 Consolidated some of the C test cases.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5456 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-02 18:37:42 +00:00