Test::Deep::Fuzzy(3pm)

Test::Deep::Fuzzy3pm

Fuzzy number comparison with test::deep

Usage

    use Test::Deep;
    use Test::Deep::Fuzzy;
    my $range = 0.001;
    cmp_deeply({
        number => 0.0078125,
    }, {
        number => is_fuzzy_num(0.008, $range),
    }, 'number is collect');

Overview

Test::Deep::Fuzzy provides fuzzy number comparison with Test::Deep.

Functions

is_fuzzy_num EXPECTED, RANGE

Rounds the values before comparing the values. The RANGE is used for "Math::Round::nearest()" to compare the values.

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9–10
  2. 11
  3. 12
  4. 13

License

Copyright (C) karupanerura.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Author

karupanerura <[email protected]>

From libtest-deep-fuzzy-perl 0.01-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.