diff options
-rw-r--r-- | Examples/test-suite/director_basic.i | 21 | ||||
-rw-r--r-- | Examples/test-suite/features.i | 11 |
2 files changed, 28 insertions, 4 deletions
diff --git a/Examples/test-suite/director_basic.i b/Examples/test-suite/director_basic.i index 6d435e0c6..a516dfaaa 100644 --- a/Examples/test-suite/director_basic.i +++ b/Examples/test-suite/director_basic.i @@ -55,3 +55,24 @@ namespace hi { %} + + +%feature("director") MyClass; + +%inline %{ + +typedef void NT; + +class MyClass { +public: + virtual void method(NT *) + { + } + + virtual ~MyClass() + { + } + +}; + +%} diff --git a/Examples/test-suite/features.i b/Examples/test-suite/features.i index 542290360..da021e385 100644 --- a/Examples/test-suite/features.i +++ b/Examples/test-suite/features.i @@ -1,5 +1,6 @@ %module features + // This testcase checks that %feature is working for templates and non user supplied constructors/destructors // If the default %exception is used it will not compile. It shouldn't get used. @@ -69,6 +70,11 @@ public: %template(TemplateInt) Template<int>; +%exception { +// default %exception +} + + %newobject One::getSquare() const; %inline %{ @@ -97,9 +103,6 @@ char *foo() {return 0;} %} -%exception { -// default %exception -} %exception std::Vector::get { // get %exception @@ -115,7 +118,7 @@ namespace std { #ifdef SWIG %extend { T& get(int i) { - throw std::out_of_range("Vector index out of range"); + throw 1; } } #endif |