<commit_before>use v6;
use Test;
plan 60;

# L<S32::Numeric/Num/"=item abs">

=begin pod

Basic tests for the abs() builtin

=end pod

for 0, 0 / 1, 0.0e0, 1, 50, 60.0e0, 99.99 {
    is(abs($_), $_, "got the right absolute value for $_");
    is(.abs, $_, 'got the right absolute value for $_='~$_);
    #?rakudo skip 'named args'
    is(abs(:x($_)), $_, "got the right absolute value for $_");

    #?rakudo 2 todo 'WHAT aspect is wrong for Ints'
    ok(abs($_) ~~ $_.WHAT, "got the right data type (" ~ $_.WHAT ~ ") of absolute value for $_");<commit_msg>[t/spec] Unfudge todo tests which now work.<commit_after>use v6;
use Test;
plan 60;

# L<S32::Numeric/Num/"=item abs">

=begin pod

Basic tests for the abs() builtin

=end pod

for 0, 0 / 1, 0.0e0, 1, 50, 60.0e0, 99.99 {
    is(abs($_), $_, "got the right absolute value for $_");
    is(.abs, $_, 'got the right absolute value for $_='~$_);
    #?rakudo skip 'named args'
    is(abs(:x($_)), $_, "got the right absolute value for $_");

    ok(abs($_) ~~ $_.WHAT, "got the right data type (" ~ $_.WHAT ~ ") of absolute value for $_");
{'fraction_non_alphanumeric': 0.184981684981685, 'fraction_numerical': 0.04120879120879121, 'mean_word_length': 3.407258064516129, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4686970', 'n_tokens_mistral': 445, 'n_tokens_neox': 402, 'n_words': 143}