<commit_before>use v6;
use Test;

my @classes = flat
    qx[perl6 -ne 'say ~$0 if /^class \h+ ("Q::" \S+)/' lib/_007/Q.pm].lines,
    qx[perl6 -ne 'say ~$0 if /^class \h+ ("Val::" \S+)/' lib/_007/Val.pm].lines;
my @builtins = qx!perl6 -ne 'say ~$0 if /"=> Val::Type.of(" (<-[)]>+)/' lib/_007/Runtime/Builtins.pm!.lines;

{
    my $missing-classes = (@builtins (-) @classes).keys.map({ "- $_" }).join("\n");
    is $missing-classes, "", "all built-in types are also classes";
}

{
    my $missing-builtins = (@classes (-) @builtins).keys.map({ "- $_" }).join("\n");
    is $missing-builtins, "", "all classes are also built-in types";
}

done-testing;<commit_msg>Update test to mirror the new Builtin structure<commit_after>use v6;
use Test;

my @classes = flat
    qx[perl6 -ne 'say ~$0 if /^class \h+ ("Q::" \S+)/' lib/_007/Q.pm].lines,
    qx[perl6 -ne 'say ~$0 if /^class \h+ ("Val::" \S+)/' lib/_007/Val.pm].lines;

my @builtins = qx!perl6 -ne 'say ~$0 if /^ \h+ ([Val|Q] "::" <-[,]>+) "," \h* $/' lib/_007/Runtime/Builtins.pm!.lines;

{
    my $missing-classes = (@builtins (-) @classes).keys.map({ "- $_" }).join("\n");
    is $missing-classes, "", "all built-in types are also classes";
}

{
    my $missing-builtins = (@classes (-) @builtins).keys.map({ "- $_" }).join("\n");
    is $missing-builtins, "", "all classes are also built-in types";
}

done-testing;
{'fraction_non_alphanumeric': 0.2556610664718773, 'fraction_numerical': 0.02337472607742878, 'mean_word_length': 3.2153846153846155, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 6, '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': '3487998', 'n_tokens_mistral': 570, 'n_tokens_neox': 541, 'n_words': 134}