summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/test
AgeCommit message (Collapse)Author
2021-03-26complex.rb: add test for arithmetic operators. [ci skip]Yukihiro "Matz" Matsumoto
Tests for (`Float` or `Integer`) `op` `Complex`. Also added test dependency to `mruby-rational` since `int_div` definition relies on `Rational` when `MRB_USE_RATIONAL` is defined.
2020-10-12Update tests for integer division.Yukihiro "Matz" Matsumoto
2020-10-12Rename float configuration option names.Yukihiro "Matz" Matsumoto
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT` - `MRB_USE_FLOAT` => `MRB_USE_FLOAT32` The former is to use `USE_XXX` naming convention. The latter is to make sure `float` is 32bit float and not floating point number in general.
2019-08-09Avoid overflow and underflow in Complex#/Ray Chason
2019-08-08Implement Complex#abs in terms of Math.hypotRay Chason
Math.hypot avoids premature overflow and underflow
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-07-13Resolve ambiguous argument warning.Yukihiro "Matz" Matsumoto
2019-06-29Use nested `assert`dearblue
2019-05-23Freeze `Rational` and `Complex` objectsKOBAYASHI Shuji
2019-05-21Remove `Complex(string)` complex generation.Yukihiro "Matz" Matsumoto
It should raise an error.
2019-05-15Basic implementation of Complex and Rational classesUkrainskiy Sergey
2019-05-15Initial suffix supportUkrainskiy Sergey