problem-solving icon indicating copy to clipboard operation
problem-solving copied to clipboard

Expmod returns a default value instead of erroring out on libtommath errors

Open MasterDuke17 opened this issue 5 years ago • 2 comments

15:49 | MasterDuke | so in roast we have tests for expmod that would that throw an exception if we were catching errors in libtommath 15:50 | MasterDuke | https://github.com/perl6/roast/blob/master/S32-num/expmod.t#L25-L37 15:51 | MasterDuke | the intent is to test that it doesn't hang, but the value we're testing for (0) is just because we don't catch the error and return a default value which ends up being 0 15:54 | MasterDuke | is it valid to just change the tests to dies-ok? 15:55 | MasterDuke | or should we try to keep behavior the same for Raku 6.c-d and change it only for Raku 6.e?

MasterDuke17 avatar Jan 17 '20 00:01 MasterDuke17

https://github.com/Raku/old-issue-tracker/issues/6053 for some reference as to why those tests were added

MasterDuke17 avatar Jan 17 '20 00:01 MasterDuke17

NQP tests fixed in https://github.com/perl6/nqp/commit/c7f4dfe9e1

MasterDuke17 avatar Jan 18 '20 21:01 MasterDuke17