<commit_before>use strict;
use warnings;

# de minimus testing

use Test::More;
use Test::Moose::More 0.017;
use Test::Fatal;

use aliased 'Moose::Meta::TypeConstraint'                    => 'TypeConstraint';
use aliased 'MooseX::Meta::TypeConstraint::Mooish'           => 'MooishTC';
use aliased 'MooseX::TraitFor::Meta::TypeConstraint::Mooish' => 'TraitFor';

my $constraint = sub { die if $_[0] ne '5' };

my $tc = MooishTC->new(
    constraint => $constraint,
);
isa_ok $tc, MooishTC;
ok $tc->has_original_constraint => 'has an original constraint';
ok $tc->mooish                  => 'is mooish';

ok  $tc->check(5)      => 'constraint passes with 5';
ok !$tc->check('five') => 'constraint fails with "five"';

done_testing;<commit_msg>tests: add crude (and TODO!) tc equality testing<commit_after>use strict;
use warnings;

# de minimus testing

use Test::More;
use Test::Moose::More 0.017;
use Test::Fatal;

use aliased 'Moose::Meta::TypeConstraint'                    => 'TypeConstraint';
use aliased 'MooseX::Meta::TypeConstraint::Mooish'           => 'MooishTC';
use aliased 'MooseX::TraitFor::Meta::TypeConstraint::Mooish' => 'TraitFor';

my $constraint = sub { die if $_[0] ne '5' };

my $tc = MooishTC->new(
    constraint => $constraint,
);

isa_ok $tc, MooishTC;
ok $tc->has_original_constraint => 'has an original constraint';
ok $tc->mooish                  => 'is mooish';

ok  $tc->check(5)      => 'constraint passes with 5';
ok !$tc->check('five') => 'constraint fails with "five"';

my $tc2 = MooishTC->new(
    constraint => $constraint,
);

isa_ok $tc2, MooishTC;
ok $tc2->has_original_constraint => 'has an original constraint';
ok $tc2->mooish                  => 'is mooish';


TODO: {
    local $TODO = 'equality fails ATM';

    cmp_ok $tc, '==', $tc2;
}

done_testing;
{'fraction_non_alphanumeric': 0.16518353726362625, 'fraction_numerical': 0.01167964404894327, 'mean_word_length': 3.7845744680851063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, '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': '3547699', 'n_tokens_mistral': 642, 'n_tokens_neox': 621, 'n_words': 163}