### ----------------------------------------------------
### -- Intl::Format::Number
### -- Licenses: Artistic-2.0
### -- Authors: Matthew Stephen Stuckwisch
### -- File: t/03-special-values.rakutest
### ----------------------------------------------------
use v6.d;
use Test;
use Intl::Format::Number;
use MONKEY-SEE-NO-EVAL;

# Most languages use the exact same values as English, but a handful
# use specialized values.  Here we check that they match what's in CLDR.

subtest {
    my &format = local-number-formatter(:language<en>, :type<decimal>, :length<standard>);
    is format(NaN), 'NaN', 'Not a number';
    is format(Inf), '∞', 'Infinity';
    is format(-Inf), '-∞', 'Negative Infinity';
}, 'English';

subtest {
    my &format = local-number-formatter(:language<ar>, :type<decimal>, :length<standard>);
    is format(NaN), 'ليس رقم', 'Not a number';
    is format(Inf), '∞', 'Infinity';
    is format(-Inf), '؜-∞', 'Negative Infinity';
}, 'Arabic';

subtest {
    my &format = local-number-formatter(:language<ru>, :type<decimal>, :length<standard>);
    is format(NaN), 'не число', 'Not a number';
    is format(Inf), '∞', 'Infinity';
    is format(-Inf), '-∞', 'Negative Infinity';
}, 'Russian';

done-testing;


