summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-rational/test/rational.rb
AgeCommit message (Collapse)Author
2021-03-27Move default `Integer#/` from `rational.c` to `complex.c`.Yukihiro "Matz" Matsumoto
2021-03-26rational.rb: add test for arithmetic operators.Yukihiro "Matz" Matsumoto
Tests for (`Float` or `Integer`) `op` `Rational`.
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-07-30Refine message to `skip` in nested `assert`KOBAYASHI Shuji
- I think "Info" is used only to `skip`, so change to "Skip". - Changed the default value of `assert` and specify the argument explicitly at the caller of `assert` because it is unnatural "Assertion failed" is output even though the assertion doesn't fail. == Example: def assert_foo(exp, act) assert do assert_equal exp[0], act[0] assert_equal exp[1], act[1] end end def assert_bar(exp, act) assert do skip end end def assert_baz(exp, act) assert do assert_equal exp, act assert_bar exp, act end end assert 'test#skip_in_nested_assert' do assert_baz 1, 1 end === Before this patch: ?.. Info: test#skip_in_nested_assert (core) - Assertion[1] Info: Assertion failed (core) - Assertion[1-2] Skip: Assertion failed (core) Total: 3 OK: 2 KO: 0 Crash: 0 Warning: 0 Skip: 1 === After this patch: ??? Skip: test#skip_in_nested_assert (core) - Assertion[1] Skip: assert (core) - Assertion[1-2] Skip: assert (core) Total: 3 OK: 0 KO: 0 Crash: 0 Warning: 0 Skip: 3
2019-06-29Use nested `assert`dearblue
2019-05-27Fix `Rational#==(Complex)`KOBAYASHI Shuji
Consider a Numreic class like `Complex` that does not have `<=>` but `==` works (`0i == 0r` is `true`).
2019-05-23Freeze `Rational` and `Complex` objectsKOBAYASHI Shuji
2019-05-22`Kernel#Rational` requires numeratorKOBAYASHI Shuji
2019-05-21Revert part of #4457KOBAYASHI Shuji
2019-05-20Change the order of "expected" and "actual" in `mruby-rational` testKOBAYASHI Shuji
2019-05-19Fix `Rational#<=>(Numeric)`KOBAYASHI Shuji
Reported by Sergey Ukrainskiy: https://github.com/mruby/mruby/commit/f5fb1307b017fb972c12b4ec4b1866d789b0ca09#r33590698
2019-05-17Drop dependency from `mruby-rational` to `mruby-numeric-ext`KOBAYASHI Shuji
2019-05-16Fix `Rational#==`KOBAYASHI Shuji
2019-05-15Fix dependenciesUkrainskiy Sergey
2019-05-15Basic implementation of Complex and Rational classesUkrainskiy Sergey
2019-05-15Initial suffix supportUkrainskiy Sergey