diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-17 23:01:41 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-17 23:02:36 +0900 |
| commit | f4a3dc4f07db538403ad719d9563ddda854b7efb (patch) | |
| tree | ec907d4a056bb6d3a03b5f459addceb1eb8866f1 /test/t | |
| parent | 12ff88563d09f7c5b9f1c03b7f10bdbebd25e647 (diff) | |
| download | mruby-f4a3dc4f07db538403ad719d9563ddda854b7efb.tar.gz mruby-f4a3dc4f07db538403ad719d9563ddda854b7efb.zip | |
Add tests for `Integer#quo` and `Float#quo`; #5268
Diffstat (limited to 'test/t')
| -rw-r--r-- | test/t/float.rb | 5 | ||||
| -rw-r--r-- | test/t/integer.rb | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/t/float.rb b/test/t/float.rb index b69cae2fb..3a0cf27bc 100644 --- a/test/t/float.rb +++ b/test/t/float.rb @@ -41,6 +41,11 @@ assert('Float#/', '15.2.9.3.4') do assert_float(1.0 , a) assert_float(3.123456789, b) end +assert('Float#quo') do + a = 3.123456789.quo(3.123456789) + + assert_float(1.0 , a) +end assert('Float#%', '15.2.9.3.5') do a = 3.125 % 3.125 diff --git a/test/t/integer.rb b/test/t/integer.rb index adc8fe828..2523d2631 100644 --- a/test/t/integer.rb +++ b/test/t/integer.rb @@ -43,6 +43,12 @@ assert('Integer#/', '15.2.8.3.4') do assert_equal 2.0, b end +assert('Integer#quo') do + a = 6.quo(5) + + assert_equal 1.2, a +end + assert('Integer#%', '15.2.8.3.5') do a = 1%1 b = 1%1.0 |
