Group
Extension

Matches 79

Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/attribute_duplication.t ( view source; MetaCPAN )
;

    my $bar_attr2 = Foo->meta->get_attribute('bar');

    ::isnt($bar_attr, $bar_attr2, '... this is a new bar attribute');
    ::isnt($bar_attr->associated_class, Foo->meta, '... and the old bar a
ribute *is* associated with Foo->meta');

    ::isnt($bar_attr2->reader, 'get_bar', '... the bar attribute no longer has the reader get_bar');
    ::isnt($bar_attr2->reader, 'set_bar', '... the bar at
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role_composition_override.t ( view source; MetaCPAN )
oo' ],
        '... got the right list of methods'
    );
}

# test simple overrides w/ conflicts
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::

        )
    );
}, undef, '... this fails as expected' );

# test simple overrides w/ conflicts
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
        )
    );
}, undef, '... this fails as expected' );


# test simple overrides w/ conflicts
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/run_time_role_composition.t ( view source; MetaCPAN )
ss->does('Bark'), '... the class does not do the Bark role');

    isa_ok($obj, 'My::Class');
    isnt(blessed($obj), 'My::Class', '... but it is no longer blessed into My::Class');

    ok(!My::Class
eeper->meta->apply($obj2);

    ok($obj2->does('Sleeper'), '... we now do the Sleeper role');
    isnt(blessed($obj), blessed($obj2), '... they DO NOT share the same anon-class/role thing');
}

{
    
e too');

    ok(!My::Class->does('Sleeper'), '... the class does not do the Sleeper role');

    isnt(blessed($obj), blessed($obj2), '... they still don\'t share the same anon-class/role thing');

  
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attribute_accessor_generation.t ( view source; MetaCPAN )
e');

    ok(!isweak($foo->{foo}), '... it is not a weak reference');

    # required writer

    isnt( exception {
        Foo->new;
    }, undef, '... cannot create without the required attribute' )
oo_int wrote successfully' );
    is($foo->foo_int(), 100, '... got the correct set value');

    isnt( exception {
        $foo->foo_int("Foo");
    }, undef, '... foo_int died successfully' );

    
oo, 'foo_deref' );
    is_deeply( [$foo->foo_deref_ro()], [], "... default default value" );

    isnt( exception {
        $foo->foo_deref_ro( [] );
    }, undef, "... read only" );

    $foo->{foo_d
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/metaclass_inheritance.t ( view source; MetaCPAN )
Bar');
isnt($bar_meta, $foo_meta, '... Bar->meta != Foo->meta');

my $baz_meta = Baz->meta;
isa_ok($baz_meta, 'Class::MOP::Class');

is($baz_meta->name, 'Baz', '... baz_meta->name == Baz');
isnt($baz_
meta, $bar_meta, '... Baz->meta != Bar->meta');
isnt($baz_meta, $foo_meta, '... Baz->meta != Foo->meta');

done_testing;
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/new_and_clone_metaclasses.t ( view source; MetaCPAN )
one_object($foo);
isa_ok($cloned_foo, 'Foo');

isnt($cloned_foo, $foo, '... $cloned_foo is a new object different from $foo');

# check some errors

isnt( exception {
    $foo_meta->clone_object($meta
OP::Attribute');

my $attr_clone = $attr->clone();
isa_ok($attr_clone, 'Class::MOP::Attribute');

isnt($attr, $attr_clone, '... we successfully cloned our attributes');
is($attr->associated_class,
   
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role_composition_errors.t ( view source; MetaCPAN )
:isnt( ::exception { with('Foo::Role') }, undef, '... no foo method implemented by Foo::Class' );
}

# class which does implement required method
{

    package Bar::Class;
    use Moose;

    ::isnt(
classes which does not implement required method
{

    package Baz::Class;
    use Moose;

    ::isnt( ::exception { with('Baz::Role') }, undef, '... no foo method implemented by Baz::Class2' );
}

#
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/misc_attribute_tests.t ( view source; MetaCPAN )
 Test::For::Lazy::TypeConstraint->new;
    isa_ok($test, 'Test::For::Lazy::TypeConstraint');

    isnt( exception {
        $test->bad_lazy_attr;
    }, undef, '... this does not work' );

    is( exc
 'ro',
            isa     => 'Str',
            default => sub { return }
        );

    }

    isnt( exception {
        Test::UndefDefault::Attributes->new;
    }, undef, '... default must return 
se Moose;

        has 'foo'  => ( required => 1, builder => 'build_foo', is => 'ro');
    }

    isnt( exception {
        Test::Builder::Attribute::Broken->new;
    }, undef, '... no builder, wtf' )
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/method_modifier_with_regexp.t ( view source; MetaCPAN )
Dog::Role;
    use Moose::Role;

    ::isnt( ::exception {
        before qr/bark.*/ => sub {};
    }, undef, '... this is not currently supported' );

    ::isnt( ::exception {
        around qr/bark
.*/ => sub {};
    }, undef, '... this is not currently supported' );

    ::isnt( ::exception {
        after  qr/bark.*/ => sub {};
    }, undef, '... this is not currently supported' );

}

done_te
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/more_attr_delegation.t ( view source; MetaCPAN )
 Moose;

    sub parent_method_1 { "parent_1" }
    ::can_ok('Parent', 'parent_method_1');

    ::isnt( ::exception {
        has child_a => (
            is      => "ro",
            default => sub {
            handles => qr/_la$/,
        );
    }, undef, "can declare regex collector" );

    ::isnt( ::exception {
        has child_d => (
            is      => "ro",
            default => sub {
gate to object even without explicit reader" );

    ::can_ok('Parent', 'parent_method_1');
    ::isnt( ::exception {
        has child_h => (
            isa     => "ChildH",
            is      => "
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role.t ( view source; MetaCPAN )
ride" };

    ::isnt( ::exception { extends() }, undef, '... extends() is not supported' );
    ::isnt( ::exception { augment() }, undef, '... augment() is not supported' );
    ::isnt( ::exception { 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role_composite_exclusion.t ( view source; MetaCPAN )
sFoo->meta->excludes_role('Role::Foo'), '... got the right exclusions');

# test simple exclusion
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
ist], ['Role::Foo'], '... has excluded roles');
}


# test conflict with an "inherited" exclusion
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
 this fails as expected' );

# test conflict with an "inherited" exclusion of an "inherited" role
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role_composition_attributes.t ( view source; MetaCPAN )
[ 'bar', 'foo' ],
        '... got the right list of attributes'
    );
}

# test simple conflict
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
            ]
        )
    );
}, undef, '... this fails as expected' );

# test complex conflict
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::

            ]
        )
    );
}, undef, '... this fails as expected' );

# test simple conflict
isnt( exception {
    Moose::Meta::Role::Application::RoleSummation->new->apply(
        Moose::Meta::
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/type_constraints/util_more_type_coercion.t ( view source; MetaCPAN )
h value of the header');
    ok(!defined($engine->header->array), '... no array value set');

    isnt( exception {
       $engine->header("Foo");
    }, undef, '... dies with the wrong type, even aft
>header->array), '... no array value set');
}

isnt( exception {
    Engine->new(header => 'Foo');
}, undef, '... dies correctly with bad params' );

isnt( exception {
    Engine->new(header => \(my $
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attribute_writer_generation.t ( view source; MetaCPAN )
e');

    ok(!isweak($foo->{foo}), '... it is not a weak reference');

    # required writer

    isnt( exception {
        Foo->new;
    }, undef, '... cannot create without the required attribute' )
ote successfully' );
    is($foo->get_foo_required(), 100, '... got the correct set value');

    isnt( exception {
        $foo->set_foo_required();
    }, undef, '... set_foo_required died successfu
nt wrote successfully' );
    is($foo->get_foo_int(), 100, '... got the correct set value');

    isnt( exception {
        $foo->set_foo_int("Foo");
    }, undef, '... set_foo_int died successfully' 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/bugs/role_caller.t ( view source; MetaCPAN )
  'method from role has correct name in caller()');
}

isnt(MyClass1->foo, "MyClass2::foo", "role method is not confused with other class" );
isnt(MyClass2->foo, "MyClass1::foo", "role method is not c
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/instance.t ( view source; MetaCPAN )
 for Foo');

my $mi_bar = Bar->meta->get_meta_instance;
isa_ok($mi_bar, "Class::MOP::Instance");

isnt($mi_foo, $mi_bar, '... they are not the same instance');

is_deeply(
    [ sort $mi_bar->get_all_
k($i_foo, "Foo");

{
    my $i_foo_2 = $mi_foo->create_instance;
    isa_ok($i_foo_2, "Foo");
    isnt($i_foo_2, $i_foo, '... not the same instance');
    is_deeply($i_foo, $i_foo_2, '... but the same
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/examples/Child_Parent_attr_inherit.t ( view source; MetaCPAN )
ent and child have the same last name ('
            . $parent->last_name
            . ')' );
}

isnt( $orphan->last_name, $parent->last_name,
          '... the orphan child does not have the same l
ent and child have the same last name ('
            . $parent->last_name
            . ')' );
}

isnt( $orphan->last_name, $parent->last_name,
    '... the orphan child is not affected by changes in 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/examples/example_w_TestDeep.t ( view source; MetaCPAN )
bar, $array_of_hashes, '... got our value correctly');

isnt( exception {
    $foo->bar({});
}, undef, '... validation failed correctly' );

isnt( exception {
    $foo->bar([{ foo => 3 }]);
}, undef, 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/create_anon.t ( view source; MetaCPAN )
reate_anon_class(
        superclasses => ['Class'],
        roles        => ['Foo'],
    );

    isnt $class_and_foo_1->name, $class_and_foo_2->name,
      'creating the same class twice without cach
uperclasses => ['Class'],
        roles        => ['Bar'],
        cache        => 1,
    );

    isnt $class_and_foo_1->name, $class_and_bar,
      'class_and_foo and class_and_bar are different';

 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.