summaryrefslogtreecommitdiff
path: root/Examples/test-suite/ruby/using_composition_runme.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/ruby/using_composition_runme.rb')
-rw-r--r--Examples/test-suite/ruby/using_composition_runme.rb56
1 files changed, 56 insertions, 0 deletions
diff --git a/Examples/test-suite/ruby/using_composition_runme.rb b/Examples/test-suite/ruby/using_composition_runme.rb
new file mode 100644
index 0000000..b9500cb
--- /dev/null
+++ b/Examples/test-suite/ruby/using_composition_runme.rb
@@ -0,0 +1,56 @@
+#!/usr/bin/env ruby
+#
+# Put description here
+#
+#
+#
+#
+#
+
+require 'swig_assert'
+
+require 'using_composition'
+
+include Using_composition
+
+f = FooBar.new
+if f.blah(3) != 3
+ raise RuntimeError,"FooBar::blah(int)"
+end
+
+if f.blah(3.5) != 3.5
+ raise RuntimeError,"FooBar::blah(double)"
+end
+
+if f.blah("hello") != "hello"
+ raise RuntimeError,"FooBar::blah(char *)"
+end
+
+
+f = FooBar2.new
+if f.blah(3) != 3
+ raise RuntimeError,"FooBar2::blah(int)"
+end
+
+if f.blah(3.5) != 3.5
+ raise RuntimeError,"FooBar2::blah(double)"
+end
+
+if f.blah("hello") != "hello"
+ raise RuntimeError,"FooBar2::blah(char *)"
+end
+
+
+f = FooBar3.new
+if f.blah(3) != 3
+ raise RuntimeError,"FooBar3::blah(int)"
+end
+
+if f.blah(3.5) != 3.5
+ raise RuntimeError,"FooBar3::blah(double)"
+end
+
+if f.blah("hello") != "hello"
+ raise RuntimeError,"FooBar3::blah(char *)"
+end
+