Many major improvements. Almost all testsuite compiles now.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@11189 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a2dc2756c8
commit
32e03aa13d
25 changed files with 1052 additions and 609 deletions
|
|
@ -10,23 +10,29 @@ srcdir = @srcdir@
|
|||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = @top_builddir@/..
|
||||
|
||||
C_TEST_CASES =
|
||||
|
||||
CPP_TEST_CASES = cast_operator \
|
||||
char_strings \
|
||||
exception_order \
|
||||
exception_partial_info \
|
||||
enums \
|
||||
enum_plus
|
||||
include $(srcdir)/../common.mk
|
||||
|
||||
#
|
||||
# BROKEN TEST CASES:
|
||||
# default_constructor - last case: when using %extend generates 2 ctors wrappers,
|
||||
# default_constructor - last case fail: using %extend generates 2 ctors wrappers,
|
||||
# both using new, while the class constructor is private
|
||||
# extend* - directive %extend is not fully supported yet
|
||||
# li* - not supported at all yet
|
||||
# long_long_apply - no INPUT, OUTPUT, INOUT typemaps defined
|
||||
# template* - not fully supported yet
|
||||
#
|
||||
CPP_TEST_BROKEN_CXX = default_constructor
|
||||
|
||||
include $(srcdir)/../common.mk
|
||||
C_CPP_TEST_BROKEN = \
|
||||
default_constructor \
|
||||
extend \
|
||||
extend_default \
|
||||
extend_placement \
|
||||
li_attribute \
|
||||
li_boost_shared_ptr \
|
||||
li_carrays \
|
||||
li_cdata \
|
||||
li_windows \
|
||||
long_long_apply
|
||||
|
||||
INTERFACEDIR = ../../
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "cast_operator/cast_operator_proxy.h"
|
||||
|
||||
int main() {
|
||||
A *a = new_A();
|
||||
if (strcmp(A_tochar(a), "hi"))
|
||||
fprintf(stderr, "cast failed\n");
|
||||
delete_A(a);
|
||||
SWIG_exit(0);
|
||||
}
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cast_operator/cast_operator_proxy.h"
|
||||
|
||||
int main() {
|
||||
A *a = new_A();
|
||||
if (strcmp(A_tochar(a), "hi"))
|
||||
fprintf(stderr, "cast failed\n");
|
||||
delete_A(a);
|
||||
SWIG_exit(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ INTERFACEDIR = ../
|
|||
|
||||
# Broken C++ test cases. (Can be run individually using make testcase.cpptest.)
|
||||
CPP_TEST_BROKEN += \
|
||||
abstract_access \
|
||||
constants \
|
||||
cpp_broken \
|
||||
exception_partial_info \
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ see bottom for a set of possible tests
|
|||
SWIGWARN_IGNORE_OPERATOR_LOR);
|
||||
#endif
|
||||
|
||||
#if defined(SWIGC)
|
||||
%warnfilter(SWIGWARN_IGNORE_OPERATOR_EQ,
|
||||
SWIGWARN_IGNORE_OPERATOR_PLUSPLUS);
|
||||
#endif
|
||||
|
||||
#if !defined(SWIGLUA) && !defined(SWIGR)
|
||||
%rename(Equal) operator =;
|
||||
%rename(PlusEqual) operator +=;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,19 @@ std::string ExceptionVars(double i, double j) {
|
|||
%}
|
||||
|
||||
%rename(ExceptionVars) Space::exceptionvars;
|
||||
|
||||
#ifdef SWIGC
|
||||
|
||||
%exception Space::exceptionvars %{
|
||||
$action
|
||||
result = (char*)$symname(1.0,2.0).c_str(); // Should expand to ExceptionVars
|
||||
result = (char*)$name(3.0,4.0).c_str(); // Should expand to Space::exceptionvars
|
||||
// above will not compile if the variables are not expanded properly
|
||||
result = "$action $name $symname $overname $wrapname";
|
||||
%}
|
||||
|
||||
#else
|
||||
|
||||
%exception Space::exceptionvars %{
|
||||
$action
|
||||
result = $symname(1.0,2.0); // Should expand to ExceptionVars
|
||||
|
|
@ -34,6 +47,9 @@ std::string ExceptionVars(double i, double j) {
|
|||
// above will not compile if the variables are not expanded properly
|
||||
result = "$action $name $symname $overname $wrapname";
|
||||
%}
|
||||
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
namespace Space {
|
||||
std::string exceptionvars(double i, double j) {
|
||||
|
|
@ -43,6 +59,20 @@ std::string exceptionvars(double i, double j) {
|
|||
%}
|
||||
|
||||
|
||||
#ifdef SWIGC
|
||||
|
||||
%exception Space::overloadedmethod %{
|
||||
$action
|
||||
result = (char*)Space::$symname(1.0).c_str();
|
||||
result = (char*)$name().c_str();
|
||||
result = (char*)$name(2.0).c_str();
|
||||
// above will not compile if the variables are not expanded properly
|
||||
result = "$action $name $symname $overname $wrapname";
|
||||
// $decl
|
||||
%}
|
||||
|
||||
#else
|
||||
|
||||
%exception Space::overloadedmethod %{
|
||||
$action
|
||||
result = Space::$symname(1.0);
|
||||
|
|
@ -53,6 +83,8 @@ std::string exceptionvars(double i, double j) {
|
|||
// $decl
|
||||
%}
|
||||
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
namespace Space {
|
||||
std::string overloadedmethod(double j) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue