12 require 'primitive_types'
14 include Primitive_types
17 raise RuntimeError if val_uchar(255) != 255
33 raise RuntimeError if fail != 1
42 raise RuntimeError if fail != 1
51 raise RuntimeError if fail != 1
53 # Test a number which won't fit in a 32 bit integer and is represented
54 # as a FIXNUM by Ruby.
55 raise RuntimeError if val_double(51767811298) != 51767811298
57 raise RuntimeError if val_double_2(1.0) != 4.0
58 raise RuntimeError if val_double_2(1) != 4
59 raise RuntimeError if val_double_2(1,1) != 2
63 val_double_2("1.0",1.0)
67 raise RuntimeError if fail != 1
72 val_double_2(1.0,"1.0")
76 raise RuntimeError if fail != 1
79 raise RuntimeError if val_float_2(1.0) != 4.0
80 raise RuntimeError if val_float_2(1) != 4
81 raise RuntimeError if val_float_2(1,1) != 2
85 val_float_2("1.0",1.0)
89 raise RuntimeError if fail != 1
94 val_float_2(1.0,"1.0")
98 raise RuntimeError if fail != 1