Errors test-suite overhaul

Use makefiles instead of a make.sh script
Expected results are in individual .stderr files instead of the expected.log file
Add errors test-suite to Travis testing and 'make check'
This commit is contained in:
William S Fulton 2014-01-18 21:35:35 +00:00
commit 3055a21505
91 changed files with 298 additions and 519 deletions

View file

@ -49,8 +49,9 @@ before_install:
script:
- ./autogen.sh && ./configure
- make -s $SWIGJOBS
- if test -z "$SWIGLANG"; then make -s check-ccache; fi
- ./swig -version
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-ccache; fi
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-errors-test-suite; fi
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi

View file

@ -3496,6 +3496,12 @@ The syntax for setting environment variables varies from one shell to the next,
make ret_by_value.ctest SWIG_FEATURES="-debug-tmsearch"
</pre></div>
<p>
There is also a special 'errors' test-suite which is a set of regression tests checking SWIG warning and error messages.
It can be run in the same way as the other language test-suites, replacing [lang] with errors, such as <tt>make check-errors-test-suite</tt>.
The test cases used and the way it works is described in <tt>Examples/test-suite/errors/Makefile.in</tt>.
</p>
<H3><a name="Extending_nn43"></a>38.10.13 Documentation</H3>

View file

@ -639,12 +639,21 @@ ALL_CLEAN = $(CPP_TEST_CASES:=.clean) \
$(CPP_TEST_BROKEN:=.clean) \
$(C_TEST_BROKEN:=.clean)
#######################################################################
# Error test suite has its own set of test cases
#######################################################################
ifneq (,$(ERROR_TEST_CASES))
check: $(ERROR_TEST_CASES)
else
#######################################################################
# The following applies for all module languages
#######################################################################
all: $(NOT_BROKEN_TEST_CASES) $(BROKEN_TEST_CASES)
all: $(NOT_BROKEN_TEST_CASES) $(BROKEN_TEST_CASES)
check: $(NOT_BROKEN_TEST_CASES)
broken: $(BROKEN_TEST_CASES)
check: $(NOT_BROKEN_TEST_CASES)
check-c: $(C_TEST_CASES:=.ctest)
@ -652,12 +661,12 @@ check-cpp: $(CPP_TEST_CASES:=.cpptest)
check-cpp11: $(CPP11_TEST_CASES:=.cpptest)
endif
# partialcheck target runs SWIG only, ie no compilation or running of tests (for a subset of languages)
partialcheck:
$(MAKE) check CC=true CXX=true LDSHARED=true CXXSHARED=true RUNTOOL=true COMPILETOOL=true
broken: $(BROKEN_TEST_CASES)
swig_and_compile_cpp = \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" \

View file

@ -0,0 +1,51 @@
#######################################################################
# Makefile for errors test-suite
#
# This test-suite is for checking SWIG errors and warnings and uses
# Python as the target language.
#
# It compares the stderr output from SWIG to the contents of the .stderr
# file for each test case. The test cases are different to those used by
# the language module test-suites. The .i files in this directory are
# used instead of those in the parent directory.
#
# When adding a new test case, be sure to commit the expected output
# file (.stderr) in addition to the test case itself.
#######################################################################
LANGUAGE = python
ERROR_EXT = newerr
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
# All .i files with prefix 'cpp_' will be treated as C++ input and remaining .i files as C input
ALL_ERROR_TEST_CASES := $(patsubst %.i,%, $(wildcard *.i))
CPP_ERROR_TEST_CASES := $(filter cpp_%, $(ALL_ERROR_TEST_CASES))
C_ERROR_TEST_CASES := $(filter-out $(CPP_ERROR_TEST_CASES), $(ALL_ERROR_TEST_CASES))
ERROR_TEST_CASES := $(CPP_ERROR_TEST_CASES:=.cpptest) \
$(C_ERROR_TEST_CASES:=.ctest)
include $(srcdir)/../common.mk
# Rules for the different types of tests
%.cpptest:
echo "$(ACTION)ing errors testcase $*"
-$(SWIG) -c++ -python -Wall $(SWIGOPT) $*.i 2> $*.$(ERROR_EXT)
$(COMPILETOOL) diff $*.stderr $*.newerr
%.ctest:
echo "$(ACTION)ing errors testcase $*"
-$(SWIG) -python -Wall $(SWIGOPT) $*.i 2> $*.$(ERROR_EXT)
$(COMPILETOOL) diff $*.stderr $*.newerr
%.clean:
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile $(LANGUAGE)_clean
@rm -f *.newerr *.py

View file

@ -0,0 +1,2 @@
c_bad_name.i:3: Warning 121: %name is deprecated. Use %rename instead.
c_bad_name.i:3: Error: Missing argument to %name directive.

View file

@ -0,0 +1 @@
c_bad_native.i:3: Error: %native declaration 'foo' is not a function.

View file

@ -0,0 +1,2 @@
c_class.i:3: Warning 301: class keyword used, but not in C++ mode.
c_class.i:3: Warning 314: 'class' is a python keyword, renaming to '_class'

View file

@ -0,0 +1,2 @@
c_deprecated.i:3: Warning 102: %val directive deprecated (ignored).
c_deprecated.i:3: Warning 103: %out directive deprecated (ignored).

View file

@ -0,0 +1 @@
c_empty_char.i:3: Error: Empty character constant

View file

@ -0,0 +1 @@
c_enum_badvalue.i:6: Error: Type error. Expecting an integral type

View file

@ -0,0 +1 @@
c_extra_rblock.i:5: Error: Syntax error in input(1).

View file

@ -0,0 +1 @@
c_extra_rbrace.i:5: Error: Syntax error. Extraneous '}'

View file

@ -0,0 +1,3 @@
c_extra_unsigned.i:3: Error: Extra unsigned specifier.
c_extra_unsigned.i:4: Error: Extra signed specifier.
c_extra_unsigned.i:5: Error: Extra signed specifier.

View file

@ -0,0 +1 @@
c_insert_missing.i:3: Error: Couldn't find 'missing_file.i'.

View file

@ -0,0 +1,4 @@
c_long_short.i:3: Error: Extra long specifier.
c_long_short.i:4: Error: Extra short specifier.
c_long_short.i:5: Error: Extra long specifier.
c_long_short.i:6: Error: Extra short specifier.

View file

@ -0,0 +1,2 @@
c_missing_rbrace.i:3: Error: Missing '}'. Reached end of input.
c_missing_rbrace.i:3: Error: Syntax error in input(1).

View file

@ -0,0 +1 @@
c_missing_semi.i:3: Error: Syntax error in input(1).

View file

@ -0,0 +1,6 @@
c_redefine.i:4: Warning 302: Identifier 'foo' redefined (ignored),
c_redefine.i:3: Warning 302: previous definition of 'foo'.
c_redefine.i:8: Warning 302: Identifier 'bar' redefined (ignored),
c_redefine.i:6: Warning 302: previous definition of 'bar'.
c_redefine.i:14: Warning 322: Redundant redeclaration of 'bar' (Renamed from 'spam'),
c_redefine.i:6: Warning 322: previous declaration of 'bar'.

View file

@ -0,0 +1 @@
c_varargs_neg.i:3: Error: Argument count in %varargs must be positive.

View file

@ -0,0 +1,2 @@
cpp_bad_extern.i:5: Warning 313: Unrecognized extern type "INTERCAL".
cpp_bad_extern.i:7: Warning 313: Unrecognized extern type "INTERCAL".

View file

@ -0,0 +1,19 @@
cpp_extend_destructors.i:8: Warning 302: Identifier '~AStruct' redefined by %extend (ignored),
cpp_extend_destructors.i:5: Warning 302: %extend definition of '~AStruct'.
cpp_extend_destructors.i:14: Warning 302: Identifier '~BStruct' redefined (ignored),
cpp_extend_destructors.i:13: Warning 302: previous definition of '~BStruct'.
cpp_extend_destructors.i:87: Warning 302: Identifier '~JStruct' redefined (ignored),
cpp_extend_destructors.i:85: Warning 302: previous definition of '~JStruct'.
cpp_extend_destructors.i:100: Warning 302: Identifier '~LStruct' redefined (ignored),
cpp_extend_destructors.i:98: Warning 302: previous definition of '~LStruct'.
cpp_extend_destructors.i:24: Warning 521: Illegal destructor name CStruct::~NOT_CStruct(). Ignored.
cpp_extend_destructors.i:30: Warning 521: Illegal destructor name DStruct::~NOT_DStruct(). Ignored.
cpp_extend_destructors.i:44: Warning 521: Illegal destructor name EStruct::~NOT_EStruct(). Ignored.
cpp_extend_destructors.i:50: Warning 521: Illegal destructor name FStruct::~NOT_FStruct(). Ignored.
cpp_extend_destructors.i:65: Warning 521: Illegal destructor name GStruct::~NOT_GStruct(). Ignored.
cpp_extend_destructors.i:72: Warning 521: Illegal destructor name HStruct::~NOT_HStruct(). Ignored.
cpp_extend_destructors.i:81: Warning 521: Illegal destructor name IStruct::~NOT_IStruct(). Ignored.
cpp_extend_destructors.i:86: Warning 521: Illegal destructor name JStruct::~NOT_JStruct(). Ignored.
cpp_extend_destructors.i:92: Warning 521: Illegal destructor name KStruct::~NOT_KStruct(). Ignored.
cpp_extend_destructors.i:99: Warning 521: Illegal destructor name LStruct< int >::~NOT_LStruct(). Ignored.
cpp_extend_destructors.i:99: Warning 521: Illegal destructor name LStruct< short >::~NOT_LStruct(). Ignored.

View file

@ -0,0 +1,4 @@
cpp_extend_redefine.i:9: Warning 302: Identifier 'bar' redefined by %extend (ignored),
cpp_extend_redefine.i:5: Warning 302: %extend definition of 'bar'.
cpp_extend_redefine.i:14: Warning 322: Redundant redeclaration of 'spam',
cpp_extend_redefine.i:10: Warning 322: previous declaration of 'spam'.

View file

@ -0,0 +1 @@
cpp_extend_undefined.i:6: Warning 303: %extend defined for an undeclared class foo.

View file

@ -0,0 +1,20 @@
cpp_inherit.i:18: Warning 309: private inheritance from base 'A3' (ignored).
cpp_inherit.i:20: Warning 309: private inheritance from base 'A4' (ignored).
cpp_inherit.i:28: Warning 309: protected inheritance from base 'A8< double >' (ignored).
cpp_inherit.i:39: Warning 319: No access specifier given for base class 'B1' (ignored).
cpp_inherit.i:40: Warning 319: No access specifier given for base class 'B2< int >' (ignored).
cpp_inherit.i:15: Warning 401: Base class 'A1' undefined.
cpp_inherit.i:33: Warning 401: 'A1' must be defined before it is used as a base class.
cpp_inherit.i:17: Warning 401: Nothing known about base class 'A2'. Ignored.
cpp_inherit.i:22: Warning 402: Base class 'A5' is incomplete.
cpp_inherit.i:4: Warning 402: Only forward declaration 'A5' was found.
cpp_inherit.i:24: Error: 'A6' is not a valid base class.
cpp_inherit.i:5: Error: See definition of 'A6'.
cpp_inherit.i:24: Warning 401: Nothing known about base class 'A6'. Ignored.
cpp_inherit.i:26: Warning 401: Nothing known about base class 'A7< int >'. Ignored.
cpp_inherit.i:26: Warning 401: Maybe you forgot to instantiate 'A7< int >' using %template.
cpp_inherit.i:45: Warning 323: Recursive scope inheritance of 'Recursive'.
cpp_inherit.i:52: Warning 401: Base class 'Base< int >' has no name as it is an empty template instantiated with '%template()'. Ignored.
cpp_inherit.i:51: Warning 401: The %template directive must be written before 'Base< int >' is used as a base class and be declared with a name.
cpp_inherit.i:53: Warning 401: Base class 'Base< double >' undefined.
cpp_inherit.i:54: Warning 401: 'Base< double >' must be defined before it is used as a base class.

View file

@ -0,0 +1 @@
cpp_inline_namespace.i:4: Error: %inline directive inside a namespace is disallowed.

View file

@ -0,0 +1,20 @@
cpp_macro_locator.i:66: Warning 204: CPP #warning, "inline warning message one".
cpp_macro_locator.i:96: Warning 204: CPP #warning, "an inline warning message 2".
cpp_macro_locator.i:53: Warning 509: Overloaded method overload1(int const *) effectively ignored,
cpp_macro_locator.i:52: Warning 509: as it is shadowed by overload1(int *).
cpp_macro_locator.i:61: Warning 509: Overloaded method overload2(int const *) effectively ignored,
cpp_macro_locator.i:60: Warning 509: as it is shadowed by overload2(int *).
cpp_macro_locator.i:64: Warning 509: Overloaded method Klass1::methodX(int const *) effectively ignored,
cpp_macro_locator.i:64: Warning 509: as it is shadowed by Klass1::methodX(int *).
cpp_macro_locator.i:68: Warning 509: Overloaded method overload3(int const *) effectively ignored,
cpp_macro_locator.i:67: Warning 509: as it is shadowed by overload3(int *).
cpp_macro_locator.i:90: Warning 509: Overloaded method overload4(int const *) effectively ignored,
cpp_macro_locator.i:89: Warning 509: as it is shadowed by overload4(int *).
cpp_macro_locator.i:94: Warning 509: Overloaded method overloadinline1(int const *) effectively ignored,
cpp_macro_locator.i:93: Warning 509: as it is shadowed by overloadinline1(int *).
cpp_macro_locator.i:95: Warning 509: Overloaded method Klass2::methodX(int const *) effectively ignored,
cpp_macro_locator.i:95: Warning 509: as it is shadowed by Klass2::methodX(int *).
cpp_macro_locator.i:98: Warning 509: Overloaded method overloadinline2(int const *) effectively ignored,
cpp_macro_locator.i:97: Warning 509: as it is shadowed by overloadinline2(int *).
cpp_macro_locator.i:101: Warning 509: Overloaded method overload5(int const *) effectively ignored,
cpp_macro_locator.i:100: Warning 509: as it is shadowed by overload5(int *).

View file

@ -0,0 +1,2 @@
cpp_missing_rparenthesis.i:5: Error: Missing ')'. Reached end of input.
cpp_missing_rparenthesis.i:5: Error: Syntax error in input(3).

View file

@ -0,0 +1 @@
cpp_missing_rtemplate.i:4: Error: Syntax error in input(1).

View file

@ -0,0 +1 @@
cpp_namespace_alias.i:8: Warning 308: Namespace alias 'B' not allowed here. Assuming 'blah'

View file

@ -0,0 +1 @@
cpp_namespace_aliasnot.i:4: Error: 'blah' is not a namespace

View file

@ -0,0 +1 @@
cpp_namespace_aliasundef.i:3: Error: Unknown namespace 'blah'

View file

@ -0,0 +1,2 @@
cpp_nested_template.i:9: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().
cpp_nested_template.i:18: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().

View file

@ -0,0 +1 @@
cpp_no_access.i:3: Warning 319: No access specifier given for base class 'foo' (ignored).

View file

@ -0,0 +1,2 @@
cpp_no_return_type.i:6: Warning 504: Function S::R() must have a return type. Ignored.
cpp_no_return_type.i:10: Warning 504: Function U::UU() must have a return type. Ignored.

View file

@ -0,0 +1,3 @@
cpp_nobase.i:3: Warning 401: Nothing known about base class 'Bar'. Ignored.
cpp_nobase.i:6: Warning 401: Nothing known about base class 'Bar< int >'. Ignored.
cpp_nobase.i:6: Warning 401: Maybe you forgot to instantiate 'Bar< int >' using %template.

View file

@ -0,0 +1,10 @@
cpp_overload_const.i:4: Warning 509: Overloaded method check(int *) effectively ignored,
cpp_overload_const.i:3: Warning 509: as it is shadowed by check(int const *).
cpp_overload_const.i:5: Warning 509: Overloaded method check(int &) effectively ignored,
cpp_overload_const.i:3: Warning 509: as it is shadowed by check(int const *).
cpp_overload_const.i:10: Warning 509: Overloaded method check(OverStruct *) effectively ignored,
cpp_overload_const.i:9: Warning 509: as it is shadowed by check(OverStruct const *).
cpp_overload_const.i:11: Warning 509: Overloaded method check(OverStruct &) effectively ignored,
cpp_overload_const.i:9: Warning 509: as it is shadowed by check(OverStruct const *).
cpp_overload_const.i:12: Warning 509: Overloaded method check(OverStruct const &) effectively ignored,
cpp_overload_const.i:9: Warning 509: as it is shadowed by check(OverStruct const *).

View file

@ -0,0 +1,2 @@
cpp_private_inherit.i:6: Warning 309: private inheritance from base 'Foo' (ignored).
cpp_private_inherit.i:9: Warning 309: protected inheritance from base 'Foo' (ignored).

View file

@ -0,0 +1 @@
:1: Error: Recursive typedef detected resolving 'pds *' to 'std::set< pds > *' to 'std::set< std::set< pds > > *' and so on...

View file

@ -0,0 +1,3 @@
cpp_shared_ptr.i:20: Warning 520: Base class 'A' of 'C' is not similarly marked as a smart pointer.
cpp_shared_ptr.i:24: Warning 520: Derived class 'D' of 'C' is not similarly marked as a smart pointer.
cpp_shared_ptr.i:24: Warning 520: Derived class 'D' of 'B' is not similarly marked as a smart pointer.

View file

@ -0,0 +1,2 @@
cpp_template_nargs.i:5: Error: Template 'blah' undefined.
cpp_template_nargs.i:6: Error: Template 'blah' undefined.

View file

@ -0,0 +1 @@
cpp_template_not.i:5: Error: 'blah' is not defined as a template. (cdecl)

View file

@ -0,0 +1 @@
cpp_template_partial.i:3: Warning 317: Specialization of non-template 'vector'.

View file

@ -0,0 +1 @@
cpp_template_undef.i:3: Error: Template 'blah' undefined.

View file

@ -0,0 +1 @@
cpp_using_not.i:4: Error: 'blah' is not a namespace.

View file

@ -0,0 +1,2 @@
cpp_using_undef.i:4: Error: Nothing known about namespace 'foo'
cpp_using_undef.i:3: Warning 315: Nothing known about 'foo::bar'.

View file

@ -1,390 +0,0 @@
SWIG error and warning test. opts=
-----------------------------------------------------------
:::::::::::::::::::::::::::::::: c_bad_name.i :::::::::::::::::::::::::::::::::::
c_bad_name.i:3: Warning 121: %name is deprecated. Use %rename instead.
c_bad_name.i:3: Error: Missing argument to %name directive.
:::::::::::::::::::::::::::::::: c_bad_native.i :::::::::::::::::::::::::::::::::::
c_bad_native.i:3: Error: %native declaration 'foo' is not a function.
:::::::::::::::::::::::::::::::: c_class.i :::::::::::::::::::::::::::::::::::
c_class.i:3: Warning 301: class keyword used, but not in C++ mode.
c_class.i:3: Warning 314: 'class' is a python keyword, renaming to '_class'
:::::::::::::::::::::::::::::::: c_default_error.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: c_deprecated.i :::::::::::::::::::::::::::::::::::
c_deprecated.i:3: Warning 102: %val directive deprecated (ignored).
c_deprecated.i:3: Warning 103: %out directive deprecated (ignored).
:::::::::::::::::::::::::::::::: c_empty_char.i :::::::::::::::::::::::::::::::::::
c_empty_char.i:3: Error: Empty character constant
0
:::::::::::::::::::::::::::::::: c_enum_badvalue.i :::::::::::::::::::::::::::::::::::
c_enum_badvalue.i:6: Error: Type error. Expecting an integral type
:::::::::::::::::::::::::::::::: c_extra_rblock.i :::::::::::::::::::::::::::::::::::
c_extra_rblock.i:5: Error: Syntax error in input(1).
:::::::::::::::::::::::::::::::: c_extra_rbrace.i :::::::::::::::::::::::::::::::::::
c_extra_rbrace.i:5: Error: Syntax error. Extraneous '}'
:::::::::::::::::::::::::::::::: c_extra_unsigned.i :::::::::::::::::::::::::::::::::::
c_extra_unsigned.i:3: Error: Extra unsigned specifier.
c_extra_unsigned.i:4: Error: Extra signed specifier.
c_extra_unsigned.i:5: Error: Extra signed specifier.
:::::::::::::::::::::::::::::::: c_insert_missing.i :::::::::::::::::::::::::::::::::::
c_insert_missing.i:3: Error: Couldn't find 'missing_file.i'.
:::::::::::::::::::::::::::::::: c_long_short.i :::::::::::::::::::::::::::::::::::
c_long_short.i:3: Error: Extra long specifier.
c_long_short.i:4: Error: Extra short specifier.
c_long_short.i:5: Error: Extra long specifier.
c_long_short.i:6: Error: Extra short specifier.
:::::::::::::::::::::::::::::::: c_missing_rbrace.i :::::::::::::::::::::::::::::::::::
c_missing_rbrace.i:3: Error: Missing '}'. Reached end of input.
c_missing_rbrace.i:3: Error: Syntax error in input(1).
:::::::::::::::::::::::::::::::: c_missing_semi.i :::::::::::::::::::::::::::::::::::
c_missing_semi.i:3: Error: Syntax error in input(1).
:::::::::::::::::::::::::::::::: c_redefine.i :::::::::::::::::::::::::::::::::::
c_redefine.i:4: Warning 302: Identifier 'foo' redefined (ignored),
c_redefine.i:3: Warning 302: previous definition of 'foo'.
c_redefine.i:8: Warning 302: Identifier 'bar' redefined (ignored),
c_redefine.i:6: Warning 302: previous definition of 'bar'.
c_redefine.i:14: Warning 322: Redundant redeclaration of 'bar' (Renamed from 'spam'),
c_redefine.i:6: Warning 322: previous declaration of 'bar'.
:::::::::::::::::::::::::::::::: c_varargs.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: c_varargs_neg.i :::::::::::::::::::::::::::::::::::
c_varargs_neg.i:3: Error: Argument count in %varargs must be positive.
:::::::::::::::::::::::::::::::: nomodule.i :::::::::::::::::::::::::::::::::::
No module name specified using %module or -module.
:::::::::::::::::::::::::::::::: pp_badeval.i :::::::::::::::::::::::::::::::::::
pp_badeval.i:4: Warning 202: Could not evaluate expression 'FOO==4+'
pp_badeval.i:4: Warning 202: Error: 'Expected an expression'
:::::::::::::::::::::::::::::::: pp_constant.i :::::::::::::::::::::::::::::::::::
pp_constant.i:9: Warning 305: Bad constant value (ignored).
pp_constant.i:15: Warning 305: Bad constant value (ignored).
pp_constant.i:23: Warning 305: Bad constant value (ignored).
pp_constant.i:29: Warning 305: Bad constant value (ignored).
pp_constant.i:35: Warning 305: Bad constant value (ignored).
pp_constant.i:42: Warning 305: Bad constant value (ignored).
pp_constant.i:46: Warning 305: Bad constant value (ignored).
pp_constant.i:49: Warning 305: Bad constant value (ignored).
:::::::::::::::::::::::::::::::: pp_defined.i :::::::::::::::::::::::::::::::::::
pp_defined.i:6: Error: No arguments given to defined()
pp_defined.i:6: Error: Missing expression for #if.
:::::::::::::::::::::::::::::::: pp_deprecated.i :::::::::::::::::::::::::::::::::::
pp_deprecated.i:4: Warning 101: %extern is deprecated. Use %import instead.
pp_deprecated.i:4: Error: Unable to find 'ext;'
pp_deprecated.i:6: Warning 204: CPP #warning, "Print this warning".
pp_deprecated.i:8: Error: CPP #error "This is an error". Use the -cpperraswarn option to continue swig processing.
:::::::::::::::::::::::::::::::: pp_illegal_argument.i :::::::::::::::::::::::::::::::::::
pp_illegal_argument.i:6: Error: Illegal macro argument name '..'
pp_illegal_argument.i:10: Error: Illegal macro argument name '..'
pp_illegal_argument.i:16: Error: Illegal character in macro argument name
:::::::::::::::::::::::::::::::: pp_macro_args.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: pp_macro_badchar.i :::::::::::::::::::::::::::::::::::
pp_macro_badchar.i:4: Error: Illegal character in macro argument name
:::::::::::::::::::::::::::::::: pp_macro_defined_unterminated.i :::::::::::::::::::::::::::::::::::
pp_macro_defined_unterminated.i:4: Error: Unterminated call to 'defined'
:::::::::::::::::::::::::::::::: pp_macro_expansion.i :::::::::::::::::::::::::::::::::::
pp_macro_expansion.i:9: Error: Macro 'MACRO2' expects 2 arguments
:::::::::::::::::::::::::::::::: pp_macro_expansion_multiline.i :::::::::::::::::::::::::::::::::::
pp_macro_expansion_multiline.i:13: Warning 509: Overloaded method foo(int const *) effectively ignored,
pp_macro_expansion_multiline.i:12: Warning 509: as it is shadowed by foo(int *).
pp_macro_expansion_multiline.i:31: Warning 509: Overloaded method bar(int const *) effectively ignored,
pp_macro_expansion_multiline.i:30: Warning 509: as it is shadowed by bar(int *).
:::::::::::::::::::::::::::::::: pp_macro_inline_unterminated.i :::::::::::::::::::::::::::::::::::
pp_macro_inline_unterminated.i:9: Error: Unterminated call invoking macro 'foo'
pp_macro_inline_unterminated.i:12: Error: Syntax error in input(3).
:::::::::::::::::::::::::::::::: pp_macro_missing_expression.i :::::::::::::::::::::::::::::::::::
pp_macro_missing_expression.i:4: Error: Missing identifier for #ifdef.
pp_macro_missing_expression.i:7: Error: Missing identifier for #ifndef.
pp_macro_missing_expression.i:10: Error: Missing expression for #if.
pp_macro_missing_expression.i:14: Error: Missing expression for #elif.
pp_macro_missing_expression.i:21: Error: Missing expression for #elif.
:::::::::::::::::::::::::::::::: pp_macro_unexpected_tokens.i :::::::::::::::::::::::::::::::::::
pp_macro_unexpected_tokens.i:5: Warning 206: Unexpected tokens after #endif directive.
pp_macro_unexpected_tokens.i:8: Warning 206: Unexpected tokens after #endif directive.
pp_macro_unexpected_tokens.i:11: Warning 206: Unexpected tokens after #else directive.
pp_macro_unexpected_tokens.i:18: Warning 206: Unexpected tokens after #endif directive.
pp_macro_unexpected_tokens.i:21: Warning 206: Unexpected tokens after #else directive.
:::::::::::::::::::::::::::::::: pp_macro_nargs.i :::::::::::::::::::::::::::::::::::
pp_macro_nargs.i:7: Error: Macro 'foo' expects 2 arguments
pp_macro_nargs.i:8: Error: Macro 'foo' expects 2 arguments
pp_macro_nargs.i:10: Error: Macro 'bar' expects 1 argument
pp_macro_nargs.i:11: Error: Macro 'spam' expects no arguments
:::::::::::::::::::::::::::::::: pp_macro_redef.i :::::::::::::::::::::::::::::::::::
pp_macro_redef.i:4: Error: Macro 'foo' redefined,
pp_macro_redef.i:3: Error: previous definition of 'foo'.
pp_macro_redef.i:7: Error: Macro 'foo' redefined,
pp_macro_redef.i:3: Error: previous definition of 'foo'.
:::::::::::::::::::::::::::::::: pp_macro_rparen.i :::::::::::::::::::::::::::::::::::
pp_macro_rparen.i:3: Error: Missing ')' in macro parameters
:::::::::::::::::::::::::::::::: pp_macro_unterminated.i :::::::::::::::::::::::::::::::::::
pp_macro_unterminated.i:5: Error: Unterminated call invoking macro 'foo'
:::::::::::::::::::::::::::::::: pp_misplaced_elif.i :::::::::::::::::::::::::::::::::::
pp_misplaced_elif.i:4: Error: Misplaced #elif.
pp_misplaced_elif.i:6: Error: Extraneous #endif.
:::::::::::::::::::::::::::::::: pp_misplaced_else.i :::::::::::::::::::::::::::::::::::
pp_misplaced_else.i:4: Error: Misplaced #else.
pp_misplaced_else.i:6: Error: Extraneous #endif.
:::::::::::::::::::::::::::::::: pp_missing_enddef.i :::::::::::::::::::::::::::::::::::
pp_missing_enddef.i:EOF: Error: Missing %enddef for macro starting on line 3
:::::::::::::::::::::::::::::::: pp_missing_endif.i :::::::::::::::::::::::::::::::::::
pp_missing_endif.i:EOF: Error: Missing #endif for conditional starting on line 3
:::::::::::::::::::::::::::::::: pp_missing_file.i :::::::::::::::::::::::::::::::::::
pp_missing_file.i:3: Error: Unable to find 'missing_filename.i'
:::::::::::::::::::::::::::::::: pp_missing_rblock.i :::::::::::::::::::::::::::::::::::
pp_missing_rblock.i:EOF: Error: Unterminated %{ ... %} block starting on line 3
:::::::::::::::::::::::::::::::: pp_pragma.i :::::::::::::::::::::::::::::::::::
pp_pragma.i:4: Error: Unknown SWIG pragma: rubbish()
:::::::::::::::::::::::::::::::: pp_unterm_char.i :::::::::::::::::::::::::::::::::::
pp_unterm_char.i:EOF: Error: Unterminated character constant starting at line 4
:::::::::::::::::::::::::::::::: pp_unterm_comment.i :::::::::::::::::::::::::::::::::::
pp_unterm_comment.i:EOF: Error: Unterminated comment starting on line 3
:::::::::::::::::::::::::::::::: pp_unterm_string.i :::::::::::::::::::::::::::::::::::
pp_unterm_string.i:EOF: Error: Unterminated string constant starting at line 4
:::::::::::::::::::::::::::::::: pp_variable_args.i :::::::::::::::::::::::::::::::::::
pp_variable_args.i:6: Error: Variable length macro argument must be last parameter
:::::::::::::::::::::::::::::::: swig_apply_nargs.i :::::::::::::::::::::::::::::::::::
swig_apply_nargs.i:6: Error: Can't apply (char *str,int len) to (int x). Number of arguments don't match.
:::::::::::::::::::::::::::::::: swig_extend.i :::::::::::::::::::::::::::::::::::
swig_extend.i:19: Warning 326: Deprecated %extend name used - the struct name 'StructBName' should be used instead of the typedef name 'StructB'.
swig_extend.i:45: Warning 326: Deprecated %extend name used - the struct name 'stru_struct' should be used instead of the typedef name 'stru'.
swig_extend.i:56: Warning 326: Deprecated %extend name used - the union name 'uni_union' should be used instead of the typedef name 'uni'.
swig_extend.i:34: Warning 303: %extend defined for an undeclared class StructDName.
swig_extend.i:50: Warning 522: Use of an illegal constructor name 'stru' in %extend is deprecated, the constructor name should be 'stru_struct'.
swig_extend.i:53: Warning 523: Use of an illegal destructor name 'stru' in %extend is deprecated, the destructor name should be 'stru_struct'.
swig_extend.i:57: Warning 522: Use of an illegal constructor name 'uni' in %extend is deprecated, the constructor name should be 'uni_union'.
swig_extend.i:58: Warning 523: Use of an illegal destructor name 'uni' in %extend is deprecated, the destructor name should be 'uni_union'.
:::::::::::::::::::::::::::::::: swig_identifier.i :::::::::::::::::::::::::::::::::::
swig_identifier.i:5: Warning 503: Can't wrap 'foo bar' unless renamed to a valid identifier.
:::::::::::::::::::::::::::::::: swig_insert_bad.i :::::::::::::::::::::::::::::::::::
swig_insert_bad.i:5: Error: Unknown target 'foobar' for %insert directive.
:::::::::::::::::::::::::::::::: swig_typemap_copy.i :::::::::::::::::::::::::::::::::::
swig_typemap_copy.i:3: Error: Can't copy typemap (in) blah = int
:::::::::::::::::::::::::::::::: swig_typemap_old.i :::::::::::::::::::::::::::::::::::
swig_typemap_old.i:6: Warning 450: Deprecated typemap feature ($source/$target).
swig_typemap_old.i:6: Warning 450: The use of $source and $target in a typemap declaration is deprecated.
For typemaps related to argument input (in,ignore,default,arginit,check), replace
$source by $input and $target by $1. For typemaps related to return values (out,
argout,ret,except), replace $source by $1 and $target by $result. See the file
Doc/Manual/Typemaps.html for complete details.
:::::::::::::::::::::::::::::::: swig_typemap_warn.i :::::::::::::::::::::::::::::::::::
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg3 (arg3) - argnum: 3 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1001: Test warning for 'out' typemap for double mmm (result) - name: mmm symname: mmm &1_ltype: double * descriptor: SWIGTYPE_double
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg3 (arg3) - argnum: 3 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg3 (arg3) - argnum: 3 &1_ltype: int * descriptor: SWIGTYPE_int
:::::::::::::::::::::::::::::::: cpp_bad_extern.i :::::::::::::::::::::::::::::::::::
cpp_bad_extern.i:5: Warning 313: Unrecognized extern type "INTERCAL".
cpp_bad_extern.i:7: Warning 313: Unrecognized extern type "INTERCAL".
:::::::::::::::::::::::::::::::: cpp_extend_destructors.i :::::::::::::::::::::::::::::::::::
cpp_extend_destructors.i:8: Warning 302: Identifier '~AStruct' redefined by %extend (ignored),
cpp_extend_destructors.i:5: Warning 302: %extend definition of '~AStruct'.
cpp_extend_destructors.i:14: Warning 302: Identifier '~BStruct' redefined (ignored),
cpp_extend_destructors.i:13: Warning 302: previous definition of '~BStruct'.
cpp_extend_destructors.i:87: Warning 302: Identifier '~JStruct' redefined (ignored),
cpp_extend_destructors.i:85: Warning 302: previous definition of '~JStruct'.
cpp_extend_destructors.i:100: Warning 302: Identifier '~LStruct' redefined (ignored),
cpp_extend_destructors.i:98: Warning 302: previous definition of '~LStruct'.
cpp_extend_destructors.i:24: Warning 521: Illegal destructor name CStruct::~NOT_CStruct(). Ignored.
cpp_extend_destructors.i:30: Warning 521: Illegal destructor name DStruct::~NOT_DStruct(). Ignored.
cpp_extend_destructors.i:44: Warning 521: Illegal destructor name EStruct::~NOT_EStruct(). Ignored.
cpp_extend_destructors.i:50: Warning 521: Illegal destructor name FStruct::~NOT_FStruct(). Ignored.
cpp_extend_destructors.i:65: Warning 521: Illegal destructor name GStruct::~NOT_GStruct(). Ignored.
cpp_extend_destructors.i:72: Warning 521: Illegal destructor name HStruct::~NOT_HStruct(). Ignored.
cpp_extend_destructors.i:81: Warning 521: Illegal destructor name IStruct::~NOT_IStruct(). Ignored.
cpp_extend_destructors.i:86: Warning 521: Illegal destructor name JStruct::~NOT_JStruct(). Ignored.
cpp_extend_destructors.i:92: Warning 521: Illegal destructor name KStruct::~NOT_KStruct(). Ignored.
cpp_extend_destructors.i:99: Warning 521: Illegal destructor name LStruct< int >::~NOT_LStruct(). Ignored.
cpp_extend_destructors.i:99: Warning 521: Illegal destructor name LStruct< short >::~NOT_LStruct(). Ignored.
:::::::::::::::::::::::::::::::: cpp_extend_redefine.i :::::::::::::::::::::::::::::::::::
cpp_extend_redefine.i:9: Warning 302: Identifier 'bar' redefined by %extend (ignored),
cpp_extend_redefine.i:5: Warning 302: %extend definition of 'bar'.
cpp_extend_redefine.i:14: Warning 322: Redundant redeclaration of 'spam',
cpp_extend_redefine.i:10: Warning 322: previous declaration of 'spam'.
:::::::::::::::::::::::::::::::: cpp_extend_undefined.i :::::::::::::::::::::::::::::::::::
cpp_extend_undefined.i:6: Warning 303: %extend defined for an undeclared class foo.
:::::::::::::::::::::::::::::::: cpp_inline_namespace.i :::::::::::::::::::::::::::::::::::
cpp_inline_namespace.i:4: Error: %inline directive inside a namespace is disallowed.
:::::::::::::::::::::::::::::::: cpp_inherit.i :::::::::::::::::::::::::::::::::::
cpp_inherit.i:18: Warning 309: private inheritance from base 'A3' (ignored).
cpp_inherit.i:20: Warning 309: private inheritance from base 'A4' (ignored).
cpp_inherit.i:28: Warning 309: protected inheritance from base 'A8< double >' (ignored).
cpp_inherit.i:39: Warning 319: No access specifier given for base class 'B1' (ignored).
cpp_inherit.i:40: Warning 319: No access specifier given for base class 'B2< int >' (ignored).
cpp_inherit.i:15: Warning 401: Base class 'A1' undefined.
cpp_inherit.i:33: Warning 401: 'A1' must be defined before it is used as a base class.
cpp_inherit.i:17: Warning 401: Nothing known about base class 'A2'. Ignored.
cpp_inherit.i:22: Warning 402: Base class 'A5' is incomplete.
cpp_inherit.i:4: Warning 402: Only forward declaration 'A5' was found.
cpp_inherit.i:24: Error: 'A6' is not a valid base class.
cpp_inherit.i:5: Error: See definition of 'A6'.
cpp_inherit.i:24: Warning 401: Nothing known about base class 'A6'. Ignored.
cpp_inherit.i:26: Warning 401: Nothing known about base class 'A7< int >'. Ignored.
cpp_inherit.i:26: Warning 401: Maybe you forgot to instantiate 'A7< int >' using %template.
cpp_inherit.i:45: Warning 323: Recursive scope inheritance of 'Recursive'.
cpp_inherit.i:52: Warning 401: Base class 'Base< int >' has no name as it is an empty template instantiated with '%template()'. Ignored.
cpp_inherit.i:51: Warning 401: The %template directive must be written before 'Base< int >' is used as a base class and be declared with a name.
cpp_inherit.i:53: Warning 401: Base class 'Base< double >' undefined.
cpp_inherit.i:54: Warning 401: 'Base< double >' must be defined before it is used as a base class.
:::::::::::::::::::::::::::::::: cpp_macro_locator.i :::::::::::::::::::::::::::::::::::
cpp_macro_locator.i:66: Warning 204: CPP #warning, "inline warning message one".
cpp_macro_locator.i:96: Warning 204: CPP #warning, "an inline warning message 2".
cpp_macro_locator.i:53: Warning 509: Overloaded method overload1(int const *) effectively ignored,
cpp_macro_locator.i:52: Warning 509: as it is shadowed by overload1(int *).
cpp_macro_locator.i:61: Warning 509: Overloaded method overload2(int const *) effectively ignored,
cpp_macro_locator.i:60: Warning 509: as it is shadowed by overload2(int *).
cpp_macro_locator.i:64: Warning 509: Overloaded method Klass1::methodX(int const *) effectively ignored,
cpp_macro_locator.i:64: Warning 509: as it is shadowed by Klass1::methodX(int *).
cpp_macro_locator.i:68: Warning 509: Overloaded method overload3(int const *) effectively ignored,
cpp_macro_locator.i:67: Warning 509: as it is shadowed by overload3(int *).
cpp_macro_locator.i:90: Warning 509: Overloaded method overload4(int const *) effectively ignored,
cpp_macro_locator.i:89: Warning 509: as it is shadowed by overload4(int *).
cpp_macro_locator.i:94: Warning 509: Overloaded method overloadinline1(int const *) effectively ignored,
cpp_macro_locator.i:93: Warning 509: as it is shadowed by overloadinline1(int *).
cpp_macro_locator.i:95: Warning 509: Overloaded method Klass2::methodX(int const *) effectively ignored,
cpp_macro_locator.i:95: Warning 509: as it is shadowed by Klass2::methodX(int *).
cpp_macro_locator.i:98: Warning 509: Overloaded method overloadinline2(int const *) effectively ignored,
cpp_macro_locator.i:97: Warning 509: as it is shadowed by overloadinline2(int *).
cpp_macro_locator.i:101: Warning 509: Overloaded method overload5(int const *) effectively ignored,
cpp_macro_locator.i:100: Warning 509: as it is shadowed by overload5(int *).
:::::::::::::::::::::::::::::::: cpp_missing_rparenthesis.i :::::::::::::::::::::::::::::::::::
cpp_missing_rparenthesis.i:5: Error: Missing ')'. Reached end of input.
cpp_missing_rparenthesis.i:5: Error: Syntax error in input(3).
:::::::::::::::::::::::::::::::: cpp_missing_rtemplate.i :::::::::::::::::::::::::::::::::::
cpp_missing_rtemplate.i:4: Error: Syntax error in input(1).
:::::::::::::::::::::::::::::::: cpp_namespace_alias.i :::::::::::::::::::::::::::::::::::
cpp_namespace_alias.i:8: Warning 308: Namespace alias 'B' not allowed here. Assuming 'blah'
:::::::::::::::::::::::::::::::: cpp_namespace_aliasnot.i :::::::::::::::::::::::::::::::::::
cpp_namespace_aliasnot.i:4: Error: 'blah' is not a namespace
:::::::::::::::::::::::::::::::: cpp_namespace_aliasundef.i :::::::::::::::::::::::::::::::::::
cpp_namespace_aliasundef.i:3: Error: Unknown namespace 'blah'
:::::::::::::::::::::::::::::::: cpp_nested_template.i :::::::::::::::::::::::::::::::::::
cpp_nested_template.i:9: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().
cpp_nested_template.i:18: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().
:::::::::::::::::::::::::::::::: cpp_no_access.i :::::::::::::::::::::::::::::::::::
cpp_no_access.i:3: Warning 319: No access specifier given for base class 'foo' (ignored).
:::::::::::::::::::::::::::::::: cpp_no_return_type.i :::::::::::::::::::::::::::::::::::
cpp_no_return_type.i:6: Warning 504: Function S::R() must have a return type. Ignored.
cpp_no_return_type.i:10: Warning 504: Function U::UU() must have a return type. Ignored.
:::::::::::::::::::::::::::::::: cpp_nobase.i :::::::::::::::::::::::::::::::::::
cpp_nobase.i:3: Warning 401: Nothing known about base class 'Bar'. Ignored.
cpp_nobase.i:6: Warning 401: Nothing known about base class 'Bar< int >'. Ignored.
cpp_nobase.i:6: Warning 401: Maybe you forgot to instantiate 'Bar< int >' using %template.
:::::::::::::::::::::::::::::::: cpp_overload.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: cpp_overload_const.i :::::::::::::::::::::::::::::::::::
cpp_overload_const.i:4: Warning 509: Overloaded method check(int *) effectively ignored,
cpp_overload_const.i:3: Warning 509: as it is shadowed by check(int const *).
cpp_overload_const.i:5: Warning 509: Overloaded method check(int &) effectively ignored,
cpp_overload_const.i:3: Warning 509: as it is shadowed by check(int const *).
cpp_overload_const.i:10: Warning 509: Overloaded method check(OverStruct *) effectively ignored,
cpp_overload_const.i:9: Warning 509: as it is shadowed by check(OverStruct const *).
cpp_overload_const.i:11: Warning 509: Overloaded method check(OverStruct &) effectively ignored,
cpp_overload_const.i:9: Warning 509: as it is shadowed by check(OverStruct const *).
cpp_overload_const.i:12: Warning 509: Overloaded method check(OverStruct const &) effectively ignored,
cpp_overload_const.i:9: Warning 509: as it is shadowed by check(OverStruct const *).
:::::::::::::::::::::::::::::::: cpp_private_defvalue.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: cpp_private_inherit.i :::::::::::::::::::::::::::::::::::
cpp_private_inherit.i:6: Warning 309: private inheritance from base 'Foo' (ignored).
cpp_private_inherit.i:9: Warning 309: protected inheritance from base 'Foo' (ignored).
:::::::::::::::::::::::::::::::: cpp_recursive_typedef.i :::::::::::::::::::::::::::::::::::
:1: Error: Recursive typedef detected resolving 'pds *' to 'std::set< pds > *' to 'std::set< std::set< pds > > *' and so on...
:::::::::::::::::::::::::::::::: cpp_shared_ptr.i :::::::::::::::::::::::::::::::::::
cpp_shared_ptr.i:20: Warning 520: Base class 'A' of 'C' is not similarly marked as a smart pointer.
cpp_shared_ptr.i:24: Warning 520: Derived class 'D' of 'C' is not similarly marked as a smart pointer.
cpp_shared_ptr.i:24: Warning 520: Derived class 'D' of 'B' is not similarly marked as a smart pointer.
:::::::::::::::::::::::::::::::: cpp_template_argname.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: cpp_template_nargs.i :::::::::::::::::::::::::::::::::::
cpp_template_nargs.i:5: Error: Template 'blah' undefined.
cpp_template_nargs.i:6: Error: Template 'blah' undefined.
:::::::::::::::::::::::::::::::: cpp_template_not.i :::::::::::::::::::::::::::::::::::
cpp_template_not.i:5: Error: 'blah' is not defined as a template. (cdecl)
:::::::::::::::::::::::::::::::: cpp_template_partial.i :::::::::::::::::::::::::::::::::::
cpp_template_partial.i:3: Warning 317: Specialization of non-template 'vector'.
:::::::::::::::::::::::::::::::: cpp_template_repeat.i :::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::: cpp_template_undef.i :::::::::::::::::::::::::::::::::::
cpp_template_undef.i:3: Error: Template 'blah' undefined.
:::::::::::::::::::::::::::::::: cpp_using_not.i :::::::::::::::::::::::::::::::::::
cpp_using_not.i:4: Error: 'blah' is not a namespace.
:::::::::::::::::::::::::::::::: cpp_using_undef.i :::::::::::::::::::::::::::::::::::
cpp_using_undef.i:4: Error: Nothing known about namespace 'foo'
cpp_using_undef.i:3: Warning 315: Nothing known about 'foo::bar'.

View file

@ -1,124 +0,0 @@
#!/bin/sh
echo "---------------------------------------"
echo "Testing SWIG error and warning messages"
echo "---------------------------------------"
SWIG='../../../preinst-swig'
# Files run in C mode
CFILES='
c_bad_name
c_bad_native
c_class
c_default_error
c_deprecated
c_empty_char
c_enum_badvalue
c_extra_rblock
c_extra_rbrace
c_extra_unsigned
c_insert_missing
c_long_short
c_missing_rbrace
c_missing_semi
c_redefine
c_varargs
c_varargs_neg
nomodule
pp_badeval
pp_constant
pp_defined
pp_deprecated
pp_illegal_argument
pp_macro_args
pp_macro_badchar
pp_macro_defined_unterminated
pp_macro_expansion
pp_macro_expansion_multiline
pp_macro_inline_unterminated
pp_macro_missing_expression
pp_macro_unexpected_tokens
pp_macro_nargs
pp_macro_redef
pp_macro_rparen
pp_macro_unterminated
pp_misplaced_elif
pp_misplaced_else
pp_missing_enddef
pp_missing_endif
pp_missing_file
pp_missing_rblock
pp_pragma
pp_unterm_char
pp_unterm_comment
pp_unterm_string
pp_variable_args
swig_apply_nargs
swig_extend
swig_identifier
swig_insert_bad
swig_typemap_copy
swig_typemap_old
swig_typemap_warn
'
# Files run in C++ mode
CPPFILES='
cpp_bad_extern
cpp_extend_destructors
cpp_extend_redefine
cpp_extend_undefined
cpp_inline_namespace
cpp_inherit
cpp_macro_locator
cpp_missing_rparenthesis
cpp_missing_rtemplate
cpp_namespace_alias
cpp_namespace_aliasnot
cpp_namespace_aliasundef
cpp_nested_template
cpp_no_access
cpp_no_return_type
cpp_nobase
cpp_overload
cpp_overload_const
cpp_private_defvalue
cpp_private_inherit
cpp_recursive_typedef
cpp_shared_ptr
cpp_template_argname
cpp_template_nargs
cpp_template_not
cpp_template_partial
cpp_template_repeat
cpp_template_undef
cpp_using_not
cpp_using_undef
'
LOGFILE='test.log'
SWIGOPT=$*
rm -f ${LOGFILE}
echo "SWIG error and warning test. opts=${SWIGOPT}" >> ${LOGFILE}
echo "-----------------------------------------------------------" >> ${LOGFILE}
for i in ${CFILES}; do
echo " Testing : ${i}.i";
echo "" >> ${LOGFILE};
echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
${SWIG} -python -Wall ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
done
for i in ${CPPFILES}; do
echo " Testing : ${i}.i";
echo "" >> ${LOGFILE}
echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
${SWIG} -python -Wall -c++ ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
done
echo ""
echo "Results written to '${LOGFILE}'"

View file

@ -0,0 +1 @@
No module name specified using %module or -module.

View file

@ -0,0 +1,2 @@
pp_badeval.i:4: Warning 202: Could not evaluate expression 'FOO==4+'
pp_badeval.i:4: Warning 202: Error: 'Expected an expression'

View file

@ -0,0 +1,8 @@
pp_constant.i:9: Warning 305: Bad constant value (ignored).
pp_constant.i:15: Warning 305: Bad constant value (ignored).
pp_constant.i:23: Warning 305: Bad constant value (ignored).
pp_constant.i:29: Warning 305: Bad constant value (ignored).
pp_constant.i:35: Warning 305: Bad constant value (ignored).
pp_constant.i:42: Warning 305: Bad constant value (ignored).
pp_constant.i:46: Warning 305: Bad constant value (ignored).
pp_constant.i:49: Warning 305: Bad constant value (ignored).

View file

@ -0,0 +1,2 @@
pp_defined.i:6: Error: No arguments given to defined()
pp_defined.i:6: Error: Missing expression for #if.

View file

@ -0,0 +1,4 @@
pp_deprecated.i:4: Warning 101: %extern is deprecated. Use %import instead.
pp_deprecated.i:4: Error: Unable to find 'ext;'
pp_deprecated.i:6: Warning 204: CPP #warning, "Print this warning".
pp_deprecated.i:8: Error: CPP #error "This is an error". Use the -cpperraswarn option to continue swig processing.

View file

@ -0,0 +1,3 @@
pp_illegal_argument.i:6: Error: Illegal macro argument name '..'
pp_illegal_argument.i:10: Error: Illegal macro argument name '..'
pp_illegal_argument.i:16: Error: Illegal character in macro argument name

View file

@ -0,0 +1 @@
pp_macro_badchar.i:4: Error: Illegal character in macro argument name

View file

@ -0,0 +1 @@
pp_macro_defined_unterminated.i:4: Error: Unterminated call to 'defined'

View file

@ -0,0 +1 @@
pp_macro_expansion.i:9: Error: Macro 'MACRO2' expects 2 arguments

View file

@ -0,0 +1,4 @@
pp_macro_expansion_multiline.i:13: Warning 509: Overloaded method foo(int const *) effectively ignored,
pp_macro_expansion_multiline.i:12: Warning 509: as it is shadowed by foo(int *).
pp_macro_expansion_multiline.i:31: Warning 509: Overloaded method bar(int const *) effectively ignored,
pp_macro_expansion_multiline.i:30: Warning 509: as it is shadowed by bar(int *).

View file

@ -0,0 +1,2 @@
pp_macro_inline_unterminated.i:9: Error: Unterminated call invoking macro 'foo'
pp_macro_inline_unterminated.i:12: Error: Syntax error in input(3).

View file

@ -0,0 +1,5 @@
pp_macro_missing_expression.i:4: Error: Missing identifier for #ifdef.
pp_macro_missing_expression.i:7: Error: Missing identifier for #ifndef.
pp_macro_missing_expression.i:10: Error: Missing expression for #if.
pp_macro_missing_expression.i:14: Error: Missing expression for #elif.
pp_macro_missing_expression.i:21: Error: Missing expression for #elif.

View file

@ -0,0 +1,4 @@
pp_macro_nargs.i:7: Error: Macro 'foo' expects 2 arguments
pp_macro_nargs.i:8: Error: Macro 'foo' expects 2 arguments
pp_macro_nargs.i:10: Error: Macro 'bar' expects 1 argument
pp_macro_nargs.i:11: Error: Macro 'spam' expects no arguments

View file

@ -0,0 +1,4 @@
pp_macro_redef.i:4: Error: Macro 'foo' redefined,
pp_macro_redef.i:3: Error: previous definition of 'foo'.
pp_macro_redef.i:7: Error: Macro 'foo' redefined,
pp_macro_redef.i:3: Error: previous definition of 'foo'.

View file

@ -0,0 +1 @@
pp_macro_rparen.i:3: Error: Missing ')' in macro parameters

View file

@ -0,0 +1,5 @@
pp_macro_unexpected_tokens.i:5: Warning 206: Unexpected tokens after #endif directive.
pp_macro_unexpected_tokens.i:8: Warning 206: Unexpected tokens after #endif directive.
pp_macro_unexpected_tokens.i:11: Warning 206: Unexpected tokens after #else directive.
pp_macro_unexpected_tokens.i:18: Warning 206: Unexpected tokens after #endif directive.
pp_macro_unexpected_tokens.i:21: Warning 206: Unexpected tokens after #else directive.

View file

@ -0,0 +1 @@
pp_macro_unterminated.i:5: Error: Unterminated call invoking macro 'foo'

View file

@ -0,0 +1,2 @@
pp_misplaced_elif.i:4: Error: Misplaced #elif.
pp_misplaced_elif.i:6: Error: Extraneous #endif.

View file

@ -0,0 +1,2 @@
pp_misplaced_else.i:4: Error: Misplaced #else.
pp_misplaced_else.i:6: Error: Extraneous #endif.

View file

@ -0,0 +1 @@
pp_missing_enddef.i:EOF: Error: Missing %enddef for macro starting on line 3

View file

@ -0,0 +1 @@
pp_missing_endif.i:EOF: Error: Missing #endif for conditional starting on line 3

View file

@ -0,0 +1 @@
pp_missing_file.i:3: Error: Unable to find 'missing_filename.i'

View file

@ -0,0 +1 @@
pp_missing_rblock.i:EOF: Error: Unterminated %{ ... %} block starting on line 3

View file

@ -0,0 +1 @@
pp_pragma.i:4: Error: Unknown SWIG pragma: rubbish()

View file

@ -0,0 +1 @@
pp_unterm_char.i:EOF: Error: Unterminated character constant starting at line 4

View file

@ -0,0 +1 @@
pp_unterm_comment.i:EOF: Error: Unterminated comment starting on line 3

View file

@ -0,0 +1 @@
pp_unterm_string.i:EOF: Error: Unterminated string constant starting at line 4

View file

@ -0,0 +1 @@
pp_variable_args.i:6: Error: Variable length macro argument must be last parameter

View file

@ -0,0 +1 @@
swig_apply_nargs.i:6: Error: Can't apply (char *str,int len) to (int x). Number of arguments don't match.

View file

@ -0,0 +1,8 @@
swig_extend.i:19: Warning 326: Deprecated %extend name used - the struct name 'StructBName' should be used instead of the typedef name 'StructB'.
swig_extend.i:45: Warning 326: Deprecated %extend name used - the struct name 'stru_struct' should be used instead of the typedef name 'stru'.
swig_extend.i:56: Warning 326: Deprecated %extend name used - the union name 'uni_union' should be used instead of the typedef name 'uni'.
swig_extend.i:34: Warning 303: %extend defined for an undeclared class StructDName.
swig_extend.i:50: Warning 522: Use of an illegal constructor name 'stru' in %extend is deprecated, the constructor name should be 'stru_struct'.
swig_extend.i:53: Warning 523: Use of an illegal destructor name 'stru' in %extend is deprecated, the destructor name should be 'stru_struct'.
swig_extend.i:57: Warning 522: Use of an illegal constructor name 'uni' in %extend is deprecated, the constructor name should be 'uni_union'.
swig_extend.i:58: Warning 523: Use of an illegal destructor name 'uni' in %extend is deprecated, the destructor name should be 'uni_union'.

View file

@ -0,0 +1 @@
swig_identifier.i:5: Warning 503: Can't wrap 'foo bar' unless renamed to a valid identifier.

View file

@ -0,0 +1 @@
swig_insert_bad.i:5: Error: Unknown target 'foobar' for %insert directive.

View file

@ -0,0 +1 @@
swig_typemap_copy.i:3: Error: Can't copy typemap (in) blah = int

View file

@ -0,0 +1,6 @@
swig_typemap_old.i:6: Warning 450: Deprecated typemap feature ($source/$target).
swig_typemap_old.i:6: Warning 450: The use of $source and $target in a typemap declaration is deprecated.
For typemaps related to argument input (in,ignore,default,arginit,check), replace
$source by $input and $target by $1. For typemaps related to return values (out,
argout,ret,except), replace $source by $1 and $target by $result. See the file
Doc/Manual/Typemaps.html for complete details.

View file

@ -0,0 +1,7 @@
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg3 (arg3) - argnum: 3 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1001: Test warning for 'out' typemap for double mmm (result) - name: mmm symname: mmm &1_ltype: double * descriptor: SWIGTYPE_double
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg3 (arg3) - argnum: 3 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg3 (arg3) - argnum: 3 &1_ltype: int * descriptor: SWIGTYPE_int

View file

@ -89,6 +89,9 @@ skip-d = test -n "@SKIP_D@"
skip-gcj = test -n "@SKIP_GCJ@"
skip-android = test -n "@SKIP_ANDROID@"
# Special errors test-case
skip-errors = test -n ""
#####################################################################
# CHECK
#####################################################################
@ -249,6 +252,7 @@ java.actionexample:
# Checks testcases in the test-suite excluding those which are known to be broken
check-test-suite: \
check-errors-test-suite \
check-tcl-test-suite \
check-perl5-test-suite \
check-python-test-suite \

View file

@ -2388,6 +2388,7 @@ AC_CONFIG_FILES([ \
Source/Makefile \
Examples/Makefile \
Examples/xml/Makefile \
Examples/test-suite/errors/Makefile \
Examples/test-suite/chicken/Makefile \
Examples/test-suite/csharp/Makefile \
Examples/test-suite/d/Makefile \