more tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-02 00:33:36 +00:00
commit 6fc0b75d9e
2 changed files with 28 additions and 4 deletions

View file

@ -55,3 +55,24 @@ namespace hi {
%} %}
%feature("director") MyClass;
%inline %{
typedef void NT;
class MyClass {
public:
virtual void method(NT *)
{
}
virtual ~MyClass()
{
}
};
%}

View file

@ -1,5 +1,6 @@
%module features %module features
// This testcase checks that %feature is working for templates and non user supplied constructors/destructors // 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. // If the default %exception is used it will not compile. It shouldn't get used.
@ -69,6 +70,11 @@ public:
%template(TemplateInt) Template<int>; %template(TemplateInt) Template<int>;
%exception {
// default %exception
}
%newobject One::getSquare() const; %newobject One::getSquare() const;
%inline %{ %inline %{
@ -97,9 +103,6 @@ char *foo() {return 0;}
%} %}
%exception {
// default %exception
}
%exception std::Vector::get { %exception std::Vector::get {
// get %exception // get %exception
@ -115,7 +118,7 @@ namespace std {
#ifdef SWIG #ifdef SWIG
%extend { %extend {
T& get(int i) { T& get(int i) {
throw std::out_of_range("Vector index out of range"); throw 1;
} }
} }
#endif #endif