Last change
on this file since 270 was 270, checked in by coas-nagasima, 7 years ago |
mruby版ECNLプロトタイピング・ツールを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-ruby
|
File size:
315 bytes
|
Line | |
---|
1 | ##
|
---|
2 | # Numeric(Ext) Test
|
---|
3 |
|
---|
4 | assert('Integer#chr') do
|
---|
5 | assert_equal("A", 65.chr)
|
---|
6 | assert_equal("B", 0x42.chr)
|
---|
7 |
|
---|
8 | # multibyte encoding (not support yet)
|
---|
9 | assert_raise(RangeError) { 256.chr }
|
---|
10 | end
|
---|
11 |
|
---|
12 | assert('Integer#div') do
|
---|
13 | assert_equal 52, 365.div(7)
|
---|
14 | end
|
---|
15 |
|
---|
16 | assert('Float#div') do
|
---|
17 | assert_float 52, 365.2425.div(7)
|
---|
18 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.