summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Examples/test-suite/director_basic.i25
-rw-r--r--Examples/test-suite/ruby/director_basic_runme.rb7
2 files changed, 31 insertions, 1 deletions
diff --git a/Examples/test-suite/director_basic.i b/Examples/test-suite/director_basic.i
index a516dfaaa..dad178b97 100644
--- a/Examples/test-suite/director_basic.i
+++ b/Examples/test-suite/director_basic.i
@@ -45,7 +45,7 @@ struct A{
namespace hi {
- struct A1 : public A{
+ struct A1 : public A {
A1(std::complex<int> i, double d=0.0) : A(i, d) {}
A1(int i, bool j=false) : A(i, j) {}
@@ -65,6 +65,10 @@ typedef void NT;
class MyClass {
public:
+ MyClass(int a = 0)
+ {
+ }
+
virtual void method(NT *)
{
}
@@ -75,4 +79,23 @@ public:
};
+template<class T>
+class MyClassT {
+public:
+ MyClassT(int a = 0)
+ {
+ }
+
+ virtual void method(NT *)
+ {
+ }
+
+ virtual ~MyClassT()
+ {
+ }
+
+};
+
%}
+
+%template(MyClassT_i) MyClassT<int>;
diff --git a/Examples/test-suite/ruby/director_basic_runme.rb b/Examples/test-suite/ruby/director_basic_runme.rb
index 303b08501..fb107df11 100644
--- a/Examples/test-suite/ruby/director_basic_runme.rb
+++ b/Examples/test-suite/ruby/director_basic_runme.rb
@@ -16,3 +16,10 @@ b = Director_basic::Foo.new
raise RuntimeError if b.ping != "Foo::ping()"
raise RuntimeError if b.pong != "Foo::pong();Foo::ping()"
+
+a = Director_basic::MyClass.new
+a = Director_basic::MyClassT_i.new
+
+
+a = Director_basic::MyClass.new 1
+a = Director_basic::MyClassT_i.new 1