[libmoosex-has-sugar-perl] 07/11: Improve ::Sugar coverage

Intrigeri intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to annotated tag 1.000002-source
in repository libmoosex-has-sugar-perl.

commit a8805f162c3faf3b32830ce1442baef982214b9c
Author: Kent Fredric <kentfredric at gmail.com>
Date:   Thu Jun 26 09:48:43 2014 +1200

    Improve ::Sugar coverage
---
 t/04_values.t                 |  4 +++-
 t/lib/T4Values/DEverything.pm | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/t/04_values.t b/t/04_values.t
index 9468163..8b846de 100644
--- a/t/04_values.t
+++ b/t/04_values.t
@@ -28,7 +28,9 @@ can_unok( 'T4Values::CDeclareRo', qw( ro rw required lazy lazy_build coerce weak
 
 use T4Values::DEverything;
 
-is_deeply( T4Values::DEverything->generated, T4Values::DEverything->manual, 'All Attr Expansion' );
+is_deeply( T4Values::DEverything->generated,      T4Values::DEverything->manual,      'All Attr Expansion' );
+is_deeply( T4Values::DEverything->generated_bare, T4Values::DEverything->manual_bare, 'All Attr Expansion: bare' );
+is_deeply( T4Values::DEverything->generated_rw,   T4Values::DEverything->manual_rw,   'All Attr Expansion: rw' );
 
 can_unok( 'T4Values::DEverything', qw( ro rw required lazy lazy_build coerce weak_ref auto_deref ) );
 
diff --git a/t/lib/T4Values/DEverything.pm b/t/lib/T4Values/DEverything.pm
index 228639b..bf01228 100644
--- a/t/lib/T4Values/DEverything.pm
+++ b/t/lib/T4Values/DEverything.pm
@@ -13,6 +13,20 @@ sub generated {
   };
 }
 
+sub generated_bare {
+  {
+    isa => 'Str',
+    bare, required, lazy, lazy_build, coerce, weak_ref, auto_deref
+  };
+}
+
+sub generated_rw {
+  {
+    isa => 'Str',
+    rw, required, lazy, lazy_build, coerce, weak_ref, auto_deref
+  };
+}
+
 sub manual {
   {
     isa        => 'Str',
@@ -26,5 +40,31 @@ sub manual {
   };
 }
 
+sub manual_rw {
+  {
+    isa        => 'Str',
+    is         => 'rw',
+    required   => 1,
+    lazy       => 1,
+    lazy_build => 1,
+    coerce     => 1,
+    weak_ref   => 1,
+    auto_deref => 1,
+  };
+}
+
+sub manual_bare {
+  {
+    isa        => 'Str',
+    is         => 'bare',
+    required   => 1,
+    lazy       => 1,
+    lazy_build => 1,
+    coerce     => 1,
+    weak_ref   => 1,
+    auto_deref => 1,
+  };
+}
+
 1;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoosex-has-sugar-perl.git



More information about the Pkg-perl-cvs-commits mailing list