New warning when the smartptr feature is missing in some classes in an inheritance chain. Errors test-suite now uses Python instead of Tcl as testing language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12395 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ef3644f052
commit
3d7799fe0d
8 changed files with 107 additions and 16 deletions
29
Examples/test-suite/errors/cpp_shared_ptr.i
Normal file
29
Examples/test-suite/errors/cpp_shared_ptr.i
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
%module cpp_shared_ptr
|
||||
|
||||
%include <boost_shared_ptr.i>
|
||||
|
||||
%shared_ptr(B);
|
||||
%shared_ptr(C);
|
||||
|
||||
%inline %{
|
||||
#include <stdio.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
struct A {
|
||||
virtual ~A() {}
|
||||
};
|
||||
|
||||
struct B {
|
||||
virtual ~B() {}
|
||||
};
|
||||
|
||||
struct C : B, A {
|
||||
virtual ~C() {}
|
||||
};
|
||||
|
||||
struct D : C {
|
||||
virtual ~D() {}
|
||||
};
|
||||
%}
|
||||
|
||||
|
||||
|
|
@ -10,6 +10,7 @@ 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 :::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
|
@ -280,6 +281,11 @@ cpp_nobase.i:6: Warning 401: Maybe you forgot to instantiate 'Bar< int >' using
|
|||
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_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 :::::::::::::::::::::::::::::::::::
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ cpp_nobase
|
|||
cpp_overload
|
||||
cpp_private_defvalue
|
||||
cpp_private_inherit
|
||||
cpp_shared_ptr
|
||||
cpp_template_argname
|
||||
cpp_template_nargs
|
||||
cpp_template_not
|
||||
|
|
@ -98,14 +99,14 @@ for i in ${CFILES}; do
|
|||
echo " Testing : ${i}.i";
|
||||
echo "" >> ${LOGFILE};
|
||||
echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
|
||||
${SWIG} -Wall ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
|
||||
${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} -Wall -c++ ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
|
||||
${SWIG} -python -Wall -c++ ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue