From: Dave Rolsky Date: Sat, 25 Sep 2010 20:10:12 +0000 (-0500) Subject: Even more code path testing (add an empty trigger for all traits) X-Git-Tag: 1.15~82 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf0da4e2a7bb82a8039a70e3a0168198e9e78bfc;p=gitmo%2FMoose.git Even more code path testing (add an empty trigger for all traits) --- diff --git a/t/070_native_traits/010_trait_array.t b/t/070_native_traits/010_trait_array.t index fbad78b..233640d 100644 --- a/t/070_native_traits/010_trait_array.t +++ b/t/070_native_traits/010_trait_array.t @@ -89,6 +89,7 @@ use Test::Moose; { run_tests(build_class); run_tests( build_class( lazy => 1, default => sub { [ 42, 84 ] } ) ); + run_tests( build_class( trigger => sub { } ) ); # Will force the inlining code to check the entire arrayref when it is modified. subtype 'MyArrayRef', as 'ArrayRef', where { 1 }; diff --git a/t/070_native_traits/020_trait_bool.t b/t/070_native_traits/020_trait_bool.t index 151a16f..7307011 100644 --- a/t/070_native_traits/020_trait_bool.t +++ b/t/070_native_traits/020_trait_bool.t @@ -46,6 +46,7 @@ use Test::Moose; { run_tests(build_class); run_tests( build_class( lazy => 1 ) ); + run_tests( build_class( trigger => sub { } ) ); # Will force the inlining code to check the entire hashref when it is modified. subtype 'MyBool', as 'Bool', where { 1 }; diff --git a/t/070_native_traits/040_trait_counter.t b/t/070_native_traits/040_trait_counter.t index 39fed71..3f6ca1a 100644 --- a/t/070_native_traits/040_trait_counter.t +++ b/t/070_native_traits/040_trait_counter.t @@ -49,6 +49,7 @@ use Test::Moose; { run_tests(build_class); run_tests( build_class( lazy => 1 ) ); + run_tests( build_class( trigger => sub { } ) ); # Will force the inlining code to check the entire hashref when it is modified. subtype 'MyInt', as 'Int', where { 1 }; diff --git a/t/070_native_traits/050_trait_hash.t b/t/070_native_traits/050_trait_hash.t index 4a1cf76..63582c5 100644 --- a/t/070_native_traits/050_trait_hash.t +++ b/t/070_native_traits/050_trait_hash.t @@ -54,6 +54,7 @@ use Test::Moose; { run_tests(build_class); run_tests( build_class( lazy => 1, default => sub { { x => 1 } } ) ); + run_tests( build_class( trigger => sub { } ) ); # Will force the inlining code to check the entire hashref when it is modified. subtype 'MyHashRef', as 'HashRef[Str]', where { 1 }; diff --git a/t/070_native_traits/060_trait_number.t b/t/070_native_traits/060_trait_number.t index ddb8f4e..cfcd4fe 100644 --- a/t/070_native_traits/060_trait_number.t +++ b/t/070_native_traits/060_trait_number.t @@ -53,6 +53,7 @@ use Test::Moose; { run_tests(build_class); run_tests( build_class( lazy => 1 ) ); + run_tests( build_class( trigger => sub { } ) ); # Will force the inlining code to check the entire hashref when it is modified. subtype 'MyInt', as 'Int', where { 1 }; diff --git a/t/070_native_traits/070_trait_string.t b/t/070_native_traits/070_trait_string.t index 1f64eb2..5740906 100644 --- a/t/070_native_traits/070_trait_string.t +++ b/t/070_native_traits/070_trait_string.t @@ -59,6 +59,7 @@ use Test::Moose; { run_tests(build_class); run_tests( build_class( lazy => 1, default => q{} ) ); + run_tests( build_class( trigger => sub { } ) ); # Will force the inlining code to check the entire hashref when it is modified. subtype 'MyStr', as 'Str', where { 1 };