<commit_before>use v6;

use Test;
use Bio::Root;

plan 23;

my $s = Bio::Root.new;

ok($s.isa('Bio::Root'));

eval_dies_ok('$s.throw("foo")');
eval_dies_ok('$s.throw_not_implemented()');
lives_ok {$s.warn("foo")};
lives_ok {$s.warn_not_implemented()};
lives_ok {$s.debug("foo")};

# test strictness
$s.verbose = 2;   # convert warn to throw
eval_dies_ok('$s.throw("foo")');
eval_dies_ok('$s.throw_not_implemented()');
eval_dies_ok('$s.warn("foo")');
eval_dies_ok('$s.warn_not_implemented()');
lives_ok {$s.debug("foo")};

# check inheritance
class Foo is Bio::Root {};

my $n = Foo.new();

ok($n.isa('Foo'));
ok($n.isa('Bio::Root'));
eval_dies_ok('$n.throw("foo")');
eval_dies_ok('$n.throw_not_implemented()');
lives_ok {$n.warn("foo")};
lives_ok {$n.warn_not_implemented()};
lives_ok {$n.debug("foo")};
$s.verbose = 2;   # convert warn to throw
eval_dies_ok('$n.throw("foo")');
eval_dies_ok('$n.throw_not_implemented()');
eval_dies_ok('$n.warn("foo")');
eval_dies_ok('$n.warn_not_implemented()');
lives_ok {$n.debug("foo")};<commit_msg>* small changes for Root.t (class names can be unquoted)<commit_after>use v6;

use Test;
use Bio::Root::Root;

plan 23;

my $s = Bio::Root::Root.new;

ok($s.isa(Bio::Root::Root));
eval_dies_ok('$s.throw("foo")');
eval_dies_ok('$s.throw_not_implemented()');
lives_ok {$s.warn("foo")};
lives_ok {$s.warn_not_implemented()};
lives_ok {$s.debug("foo")};

# test strictness
$s.strict = 2;   # convert warn to throw
eval_dies_ok('$s.throw("foo")');
eval_dies_ok('$s.throw_not_implemented()');
eval_dies_ok('$s.warn("foo")');
eval_dies_ok('$s.warn_not_implemented()');
lives_ok {$s.debug("foo")};

# check inheritance
class Foo is Bio::Root::Root {};

my $n = Foo.new();

ok($n.isa(Foo));
ok($n.isa(Bio::Root::Root));
eval_dies_ok('$n.throw("foo")');
eval_dies_ok('$n.throw_not_implemented()');
lives_ok {$n.warn("foo")};
lives_ok {$n.warn_not_implemented()};
lives_ok {$n.debug("foo")};
$s.strict = 2;   # convert warn to throw
eval_dies_ok('$n.throw("foo")');
eval_dies_ok('$n.throw_not_implemented()');
eval_dies_ok('$n.warn("foo")');
eval_dies_ok('$n.warn_not_implemented()');
lives_ok {$n.debug("foo")};
{'fraction_non_alphanumeric': 0.2441534144059869, 'fraction_numerical': 0.004677268475210477, 'mean_word_length': 8.063559322033898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4831901', 'n_tokens_mistral': 947, 'n_tokens_neox': 901, 'n_words': 138}