GithubHelp home page GithubHelp logo

acme-mithaldu-xsgrabbag's People

Contributors

wchristian avatar

Watchers

 avatar  avatar  avatar

Forkers

demerphq

acme-mithaldu-xsgrabbag's Issues

Extraneous import arguments throw errors on perl 5.39.1

The code in this module is passing arguments to Acme::MITHALDU::XSGrabBag::Inline->import which includes the C code to compile. This works fine during development. For the CPAN release, there is no import method to pass the arguments to. In development versions of perl, this throws errors.

This mainly seems to be a problem in Inline::Module. I've filed a fix for that at ingydotnet/inline-module-pm#36.

deg2rad test fails on high precision CPU

$ make test
PERL_DL_NONLAZY=1 "/home/daxim/local/share/perlbrew/perls/perl-5.20.2/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t .. ok
t/basic.t ....... 1/?
#   Failed test at t/basic.t line 33.
#          got: '0.0174532923847436905'
#     expected: '0.0174532923847437'

#   Failed test at t/basic.t line 34.
#          got: '3.14159274101257324'
#     expected: '3.14159274101257'

#   Failed test at t/basic.t line 35.
#          got: '6.28318548202514648'
#     expected: '6.28318548202515'
# Looks like you failed 3 tests of 22.
t/basic.t ....... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/22 subtests

Test Summary Report
-------------------
t/basic.t     (Wstat: 768 Tests: 22 Failed: 3)
Failed tests:  15-17
Non-zero exit status: 3
Files=2, Tests=24,  0 wallclock secs ( 0.05 usr  0.00 sys +  0.25 cusr  0.03 csys =  0.33 CPU)
Result: FAIL
Failed 1/2 test programs. 3/24 subtests failed.
Makefile:864: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 3

Compare floats within a tolerance:

diff --git a/t/basic.t b/t/basic.t
index 141741d..335ea9c 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -2,6 +2,7 @@ package basic_test;
 use strictures;
 use Test::InDistDir;
 use Test::More;
+use Test::Number::Delta;

 use Acme::MITHALDU::XSGrabBag qw'
   mix
@@ -30,9 +31,9 @@ sub run {
     is mix( 3, 2, 4 ), -766896240;

     is deg2rad( 0 ),   0;
-    is deg2rad( 1 ),   0.0174532923847437;
-    is deg2rad( 180 ), 3.14159274101257;
-    is deg2rad( 360 ), 6.28318548202515;
+    delta_ok deg2rad( 1 ),   0.0174532923847436905;
+    delta_ok deg2rad( 180 ), 3.14159274101257324;
+    delta_ok deg2rad( 360 ), 6.28318548202514648;

     is rad2deg( 0 ),                  0;
     is rad2deg( 0.0174532923847437 ), 1;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.