summaryrefslogtreecommitdiffhomepage
path: root/test/t/integer.rb
AgeCommit message (Collapse)Author
2021-04-24Skip tests that use `Float` inside; ref #5421Yukihiro "Matz" Matsumoto
2021-01-17Add tests for `Integer#quo` and `Float#quo`; #5268Yukihiro "Matz" Matsumoto
2020-12-15refactor: remove trailing whitespace from C, Header, Ruby and YAML filesJohn Bampton
Lint
2020-11-14Integer operation should result in Integer.Yukihiro "Matz" Matsumoto
Should raise `RangeError` if the operation overflows.
2020-10-12Reorganize `Integer` system.Yukihiro "Matz" Matsumoto
- Integrate `Fixnum` and `Integer` - Remove `Integral` - `int / int -> int` - Replace `mrb_fixnum()` to `mrb_int()` - Replace `mrb_fixnum_value()` to `mrb_int_value()`. - Use `mrb_integer_p()` instead of `mrb_fixnum_p()`
2020-10-12Integrate `Fixnum` class into `Integer` classdearblue
* The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead.
2019-09-23Fix `Fixnum` overflow test in `Integer#<<` testKOBAYASHI Shuji
- Skip when `MRB_WITHOUT_FLOAT` is defined. - Make `Fixnum` overflow even when `MRB_INT64` is defined.
2019-09-17Fix `Fixnum#(to_s|inspect)` argument specsKOBAYASHI Shuji
Before this patch: $ bin/mruby -e 'p 3.to_s(2)' trace (most recent call last): [0] -e:1 -e:1: 'to_s': wrong number of arguments (1 for 0) (ArgumentError) After this patch: $ bin/mruby -e 'p 3.to_s(2)' "11"
2019-01-15Fix coercing for first step counter in `Numeric#step`KOBAYASHI Shuji
Before: a=[]; 7.step(4, -3.0) { |c| a << c }; p a #=> [7, 4.0] After / Ruby: a=[]; 7.step(4, -3.0) { |c| a << c }; p a #=> [7.0, 4.0]
2019-01-03Remove `Kernel#class_defined?` which is not available in CRuby; #3829Yukihiro "Matz" Matsumoto
2017-10-11Test for MRB_WITHOUT_FLOATYAMAMOTO Masaya
2015-12-17Fix "ambiguous first argument" warningZachary Scott
2015-11-18Bugfix nagative-number lshift() bit overflowmurase_syuka
2015-11-18Bugfix lshift() bit overflow; close #3023murase_syuka
2015-09-02Integer << and >> to use Float instead of raising RangeErrorYukihiro "Matz" Matsumoto
2015-04-17Fix to avoid warningMiura Hideki
2015-04-17Add test of negative arguments for Integer#%Miura Hideki
2014-06-15Move direct superclass checking to `test/t/superclass.rb`.take_cheeze
2014-05-14Add ISO No. to Integer#divmod test.yui-knk
2014-05-13Merge pull request #2190 from cremno/mrbtest-mrb_int-constantsYukihiro "Matz" Matsumoto
test fixnum overflow for add, sub and mul
2014-05-13Fix ISO No.yui-knk
2014-05-05test fixnum overflow for add, sub and mulcremno
2014-03-17Merge pull request #1871 from ksss/numeric-plusYukihiro "Matz" Matsumoto
fix bug when `0 + other object`
2014-03-16fix bug when `0 * other object`ksss
2014-03-16fix bug when `0 + other object`ksss
2014-03-04add tests for Integer#divmod.Tomoyuki Sahara
2013-08-02I fix order of actual and expect test value in integer.rb.Jun Hiroe
2013-07-06Add a few more shift testsCarson McDonald
2013-06-15Improve Integer TestsDaniel Bovensiepen
2012-09-15Add test case for Integer#stepDaniel Bovensiepen
2012-06-03Add more superclass testsDaniel Bovensiepen
2012-05-29Add Test cases for Literals, Enumeration, Exceptions and clean line endingsDaniel Bovensiepen
2012-05-23test t/*.rb spacing fixYukihiro Matsumoto
2012-05-19Complete Integer Tests for ISODaniel Bovensiepen
2012-05-16Add Tests for IntegerDaniel Bovensiepen