summaryrefslogtreecommitdiffstats
path: root/t/10-inlining.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-21 11:19:00 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-21 11:19:00 -0600
commit231745b0fd56e122e09165e1d8ffd57ae86ae749 (patch)
treeed4874d3b365d3c9b62151cf230952cdf5d29a4c /t/10-inlining.t
parent0a7125e470e2067f75faf81f7e1890bc402e5e98 (diff)
downloadbread-board-declare-231745b0fd56e122e09165e1d8ffd57ae86ae749.tar.gz
bread-board-declare-231745b0fd56e122e09165e1d8ffd57ae86ae749.zip
handle defaults with native traits properly
Diffstat (limited to 't/10-inlining.t')
-rw-r--r--t/10-inlining.t16
1 files changed, 9 insertions, 7 deletions
diff --git a/t/10-inlining.t b/t/10-inlining.t
index 091e7c6..080cefc 100644
--- a/t/10-inlining.t
+++ b/t/10-inlining.t
@@ -20,7 +20,7 @@ use Test::More;
has bool => (
traits => ['Bool'],
isa => 'Bool',
- default => 0,
+ value => 0,
handles => {
bool_unset => 'unset',
bool_set => 'set',
@@ -32,7 +32,8 @@ use Test::More;
has string => (
traits => ['String'],
isa => 'Str',
- default => '',
+ value => '',
+ default => '', # XXX: ugh, needed because of the default_default stuff
handles => {
string_prepend => 'prepend',
string_chop => 'chop',
@@ -50,7 +51,7 @@ use Test::More;
has hash => (
traits => ['Hash'],
isa => 'HashRef',
- default => sub { {} },
+ block => sub { {} },
handles => {
hash_delete => 'delete',
hash_exists => 'exists',
@@ -71,7 +72,8 @@ use Test::More;
has counter => (
traits => ['Counter'],
isa => 'Int',
- default => 1,
+ value => 0,
+ default => 0, # XXX: ugh, needed because of the default_default stuff
handles => {
counter_set => 'set',
counter_reset => 'reset',
@@ -83,7 +85,7 @@ use Test::More;
has code => (
traits => ['Code'],
isa => 'CodeRef',
- default => 1,
+ block => sub { sub { } },
handles => {
code_execute => 'execute',
code_execute_method => 'execute_method',
@@ -93,7 +95,7 @@ use Test::More;
has array => (
traits => ['Array'],
isa => 'ArrayRef',
- default => sub { [] },
+ block => sub { [] },
handles => {
array_unshift => 'unshift',
array_shuffle => 'shuffle',
@@ -125,7 +127,7 @@ use Test::More;
has number => (
traits => ['Number'],
isa => 'Num',
- default => 1,
+ value => 1,
handles => {
number_add => 'add',
number_set => 'set',