PageRenderTime 15ms CodeModel.GetById 1ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/ruby/using_composition_runme.rb

#
Ruby | 56 lines | 33 code | 15 blank | 8 comment | 18 complexity | 14a96cd1006f0d1355b03ac4ba5bda37 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Put description here
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11
12require 'using_composition'
13
14include Using_composition
15
16f = FooBar.new
17if f.blah(3) != 3
18  raise RuntimeError,"FooBar::blah(int)"
19end
20
21if f.blah(3.5) != 3.5
22  raise RuntimeError,"FooBar::blah(double)"
23end
24
25if f.blah("hello") != "hello"
26  raise RuntimeError,"FooBar::blah(char *)"
27end
28
29
30f = FooBar2.new
31if f.blah(3) != 3
32  raise RuntimeError,"FooBar2::blah(int)"
33end
34
35if f.blah(3.5) != 3.5
36  raise RuntimeError,"FooBar2::blah(double)"
37end
38
39if f.blah("hello") != "hello"
40  raise RuntimeError,"FooBar2::blah(char *)"
41end
42
43
44f = FooBar3.new
45if f.blah(3) != 3
46  raise RuntimeError,"FooBar3::blah(int)"
47end
48
49if f.blah(3.5) != 3.5
50  raise RuntimeError,"FooBar3::blah(double)"
51end
52
53if f.blah("hello") != "hello"
54  raise RuntimeError,"FooBar3::blah(char *)"
55end
56