Upstream version 1.3.40
[profile/ivi/swig.git] / Examples / test-suite / ruby / smart_pointer_overload_runme.rb
1 #!/usr/bin/env ruby
2 #
3 # Put description here
4 #
5
6
7
8 #
9
10 require 'swig_assert'
11
12 require 'smart_pointer_overload'
13
14 include Smart_pointer_overload
15
16 f = Foo.new
17 b = Bar.new(f)
18
19
20 raise RuntimeError if f.test(3) != 1
21 raise RuntimeError if f.test(3.5) != 2
22 raise RuntimeError if f.test("hello") != 3
23
24 raise RuntimeError if b.test(3) != 1
25 raise RuntimeError if b.test(3.5) != 2
26 raise RuntimeError if b.test("hello") != 3
27