PageRenderTime 21ms CodeModel.GetById 10ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Ruby | 38 lines | 15 code | 15 blank | 8 comment | 24 complexity | ca75ab1bd873ae876d0f9672b0af4442 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Put description here
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11
12require 'primitive_ref'
13
14include Primitive_ref
15
16raise RuntimeError if ref_int(3) != 3
17
18raise RuntimeError if ref_uint(3) != 3
19
20raise RuntimeError if ref_short(3) != 3
21
22raise RuntimeError if ref_ushort(3) != 3
23
24raise RuntimeError if ref_long(3) != 3
25
26raise RuntimeError if ref_ulong(3) != 3
27
28raise RuntimeError if ref_schar(3) != 3
29
30raise RuntimeError if ref_uchar(3) != 3
31
32raise RuntimeError if ref_float(3.5) != 3.5
33
34raise RuntimeError if ref_double(3.5) != 3.5
35
36raise RuntimeError if ref_bool(true) != true
37
38raise RuntimeError if ref_char('x') != 'x'