make_accessor, make_ro_accessor, make_rw_accessor
[gitmo/MooseX-Emulate-Class-Accessor-Fast.git] / t / getset.t
CommitLineData
c5a105b3 1#!perl
2use strict;
3use Test::More tests => 3;
4
5require_ok("MooseX::Adopt::Class::Accessor::Fast");
6
7@Foo::ISA = qw(Class::Accessor::Fast);
8Foo->mk_accessors(qw( foo ));
9
10my $test = Foo->new({ foo => 49 });
11
12is( $test->get('foo'), 49, "get initial foo");
13$test->set('foo', 42);
14is($test->get('foo'), 42, "get new foo");