Pull requests

#4 Merged
Repository
barbasa
Branch
default
Repository
shlomif
Branch
default

Using in_between to compare decimal numbers

Author
  1. barbasa
Reviewers
Description
No description
  • Learn about pull requests

Comments (2)

  1. Shlomi Fish repo owner

    Hi Barbasa,

    three comments:

    1. You need to add t/lib/Utils.pm to the MANIFEST.

    2. Please include a Changes blurb.

    3. You have "1E+13" as the high tolerance which is a very large number and would defeat the point of the check. You probably mean "1E-13".

    Please correct these problems.

    Regards,

    -- Shlomi Fish

  2. Shlomi Fish repo owner

    Hi Fabio,

    thanks for fixing my previous comments, but I have more (sorry):

    1. "Thanks to Andreas J. König to report it and to Fabio Ponciroli to fix it."

    > should be "Thanks to Andreas J. König for reporting it and to Fabio Ponciroli for fixing it."

    2. In is_array_between you should:

    2.1) Make sure the lengths of the array match.

    2.2) Iterate over the indexes of both arrays instead of over one array while incrementing the index.

    2.3) similarly to compare_hash_by_ranges, make an entire comparison over the entire array (also similarly to is_deeply), while returning a single assertion. You may wish to extract the comparison itself out of is_between so you won't generate an "ok" assertion. Finally, make sure you update the "# TEST" assertions and the test count to put it in a single assertion.

    Thanks!

    Regards,

    -- Shlomi Fish