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

{
    my %hash = :foo, :42bar;
    is-deeply %hash.Map, Map.new( (:foo, :42bar) ),
        '.Map on defined Hash produces correct Map';
    is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object';
}

# vim: ft=perl6<commit_msg>Test an untested method in Any-iterable-methods.pm<commit_after>use v6;
use Test;
plan 3;

{
    my %hash = :foo, :42bar;
    is-deeply %hash.Map, Map.new( (:foo, :42bar) ),
        '.Map on defined Hash produces correct Map';
    is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object';
    throws-like(
        { %hash.map(Hash) },
        X::AdHoc,
        message => /"Cannot map a {%hash.WHAT.perl} to a Hash."/,
        '<object|type>.map(Hash) should die'
    );
}

# vim: ft=perl6
{'fraction_non_alphanumeric': 0.15345911949685534, 'fraction_numerical': 0.01761006289308176, 'mean_word_length': 2.772511848341232, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2523044', 'n_tokens_mistral': 298, 'n_tokens_neox': 285, 'n_words': 89}