From 231745b0fd56e122e09165e1d8ffd57ae86ae749 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 21 Feb 2011 11:19:00 -0600 Subject: handle defaults with native traits properly --- t/10-inlining.t | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 't/10-inlining.t') 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', -- cgit v1.2.3