DCIT / perl-CryptX

https://metacpan.org/pod/CryptX
Other
35 stars 23 forks source link

t/mbi_ltm_bigintpm.t etc. started to fail (with latest Math::BigInt?) #46

Closed eserte closed 5 years ago

eserte commented 6 years ago

See subject. A sample fail report: http://www.cpantesters.org/cpan/report/7e1a0a5a-d6c9-11e8-afbf-aec3b07506ca

Probably fails if the latest Math::BigInt is installed (@pjacklam FYI).

karel-m commented 6 years ago

I have skipped the trouble making tests - see 20ea7e6045f25c

Now available from CPAN as CryptX-0.061_001

eserte commented 6 years ago

Does not seem to fail anymore. Closing issue.

pjacklam commented 6 years ago

Some functionality regarding signed bitwise operators was moved into Math::BigInt::Lib, and since Math::BigInt::LTM is not a subclass of Math::BigInt::Lib, that functionality is lost for this distribution.

karel-m commented 6 years ago

Reopening, seems like we need a proper fix here.

karel-m commented 6 years ago

I have commited a better fix.

@pjacklam what is the easiest way to test Math::BigInt::LTM against the latest Math::BigInt test suite?

karel-m commented 5 years ago

fixed in CryptX-0.063

pjacklam commented 5 years ago

@pjacklam what is the easiest way to test Math::BigInt::LTM against the latest Math::BigInt test suite?

The only solution I see is to copy the test files from the new Math-BigInt distribution into the library distribution and release a new version of the library. I am not at all satisfied with this 'solution', but I don't see any good and simple alternatives.

When I change the behaviour of Math::Big(Int|Float), I need to change the corresponding tests, but that will cause the test suits for the backend libraries to fail, even though there is no problem with the library. For instance, I recently discovered that

Math::BigInt -> new("2") -> bpow("-3")

returns NaN, when it should have returned 0. I have changed the tests accordingly, but when these changes are published, and the test suits for the various libraries will start failing again …