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

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

#
Ruby | 36 lines | 19 code | 9 blank | 8 comment | 10 complexity | e6e1c4cabe350a8e792345e4454961cd 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_extend'
13
14include Using_extend
15
16f = FooBar.new
17if f.blah(3) != 3
18  raise RuntimeError,"blah(int)"
19end
20
21if f.blah(3.5) != 3.5
22  raise RuntimeError,"blah(double)"
23end
24
25if f.blah("hello") != "hello"
26  raise RuntimeError,"blah(char *)"
27end
28
29if f.blah(3,4) != 7
30  raise RuntimeError,"blah(int,int)"
31end
32
33if f.blah(3.5,7.5) != (3.5+7.5)
34  raise RuntimeError,"blah(double,double)"
35end
36