<commit_before>use strict;
use warnings;

{
    package TestClass;

    use Moose;
    use namespace::autoclean;
    use MooseX::AttributeShortcuts;

    has foo  => (is => 'rw', clearer => 1, predicate => -1);
    has _foo => (is => 'rw', clearer => 1, predicate => -1);

    has bar  => (is => 'rw', predicate => 1, clearer => -1);
    has _bar => (is => 'rw', predicate => 1, clearer => -1);
}

use Test::More;
use Test::Moose;

require 't/funcs.pm' unless eval { require funcs };

with_immutable {

    test_class_sanity_checks('TestClass');
    check_attribute('TestClass', foo  => (accessor => 'foo',  clearer   => 'clear_foo',  predicate => '_has_foo'));
    check_attribute('TestClass', _foo => (accessor => '_foo', clearer   => '_clear_foo', predicate => 'has_foo'));
    check_attribute('TestClass', bar  => (accessor => 'bar',  predicate => 'has_bar',    clearer   => '_clear_bar'));
    check_attribute('TestClass', _bar => (accessor => '_bar', predicate => '_has_bar',   clearer   => 'clear_bar'));

} 'TestClass';

done_testing;<commit_msg>refactor some tests to use just Test::Moose::More<commit_after>use strict;
use warnings;

{
    package TestClass;

    use Moose;
    use namespace::autoclean;
    use MooseX::AttributeShortcuts;

    has foo  => (is => 'rw', clearer => 1, predicate => -1);
    has _foo => (is => 'rw', clearer => 1, predicate => -1);

    has bar  => (is => 'rw', predicate => 1, clearer => -1);
    has _bar => (is => 'rw', predicate => 1, clearer => -1);
}

use Test::More;
use Test::Moose;
use Test::Moose::More 0.043;

validate_class TestClass => (
    methods => [qw{
        foo     clear_foo      _has_foo
        _foo    _clear_foo     has_foo
        bar     has_bar        _clear_bar
        _bar    _has_bar       clear_bar
    }],

    attributes => [
        foo  => { accessor => 'foo',  clearer   => 'clear_foo',  predicate => '_has_foo'   },
        _foo => { accessor => '_foo', clearer   => '_clear_foo', predicate => 'has_foo'    },
        bar  => { accessor => 'bar',  predicate => 'has_bar',    clearer   => '_clear_bar' },
        _bar => { accessor => '_bar', predicate => '_has_bar',   clearer   => 'clear_bar'  },
    ],
);

done_testing;
{'fraction_non_alphanumeric': 0.17604355716878403, 'fraction_numerical': 0.009074410163339383, 'mean_word_length': 2.972972972972973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 70, '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': '2734698', 'n_tokens_mistral': 779, 'n_tokens_neox': 736, 'n_words': 192}