diff options
author | Marcelo Matus <mmatus@acms.arizona.edu> | 2004-11-02 00:33:36 +0000 |
---|---|---|
committer | Marcelo Matus <mmatus@acms.arizona.edu> | 2004-11-02 00:33:36 +0000 |
commit | 6fc0b75d9e1c2513b8a9e6dc06928bd24f6044bc (patch) | |
tree | 03c54a1efc9f2e157cb1f450e3b537a3b7399ed1 | |
parent | 896c307fdca9a2239810d651bc9cb780437dff17 (diff) | |
download | swig-6fc0b75d9e1c2513b8a9e6dc06928bd24f6044bc.tar.gz |
more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-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 |