add (author-only) warning tests
Karen Etheridge [Sat, 14 Sep 2013 21:21:59 +0000 (14:21 -0700)]
t/01-string.t
t/02-numeric.t
t/03-idiot.t
t/04-coerce.t

index 63f2298..905805e 100644 (file)
@@ -1,6 +1,8 @@
 use strict;
 use warnings FATAL => 'all';
-use Test::More tests => 33;
+
+use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 
 use MooseX::Types::Common::String qw(
     SimpleStr
@@ -60,3 +62,4 @@ ok(is_NumericCode('032'),  'NumericCode lives');
 ok(!is_NumericCode('abc'),  'NumericCode dies' );
 ok(!is_NumericCode('x18'),  'mixed NumericCode dies');
 
+done_testing;
index 6e12e96..67d1ccb 100644 (file)
@@ -1,7 +1,8 @@
 use strict;
 use warnings FATAL => 'all';
-use Test::More tests => 34;
-use Test::Fatal;
+
+use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 
 use MooseX::Types::Common::Numeric qw(
     PositiveNum PositiveOrZeroNum
@@ -49,3 +50,5 @@ ok(is_NegativeOrZeroNum(-100.885), 'NegativeOrZeroNum (-100.885)');
 ok(!is_NegativeOrZeroNum(100.885), 'NegativeOrZeroNum (100.885)');
 ok(is_NegativeOrZeroNum(0), 'NegativeOrZeroNum (0)');
 ok(is_NegativeOrZeroNum(-0.0000000001), 'NegativeOrZeroNum (-0.0000000001)');
+
+done_testing;
index c51c609..9d270c7 100644 (file)
@@ -1,7 +1,7 @@
 use strict;
 use warnings FATAL => 'all';
 
-use Test::More tests => 2;
+use Test::More;
 use Test::Warnings ':no_end_test', ':all';
 use Test::Deep;
 
@@ -22,3 +22,5 @@ cmp_deeply(
     'Warning mentions bad type',
 );
 
+had_no_warnings if $ENV{AUTHOR_TESTING};
+done_testing;
index 8560e6d..d44c6e4 100644 (file)
@@ -1,6 +1,8 @@
 use strict;
 use warnings FATAL => 'all';
-use Test::More tests => 5;
+
+use Test::More;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 
 use MooseX::Types::Common::String qw(
     LowerCaseSimpleStr
@@ -17,3 +19,5 @@ is(to_UpperCaseStr('foo'), 'FOO', 'uppercase str' );
 is(to_LowerCaseStr('BAR'), 'bar', 'lowercase str' );
 
 is(to_NumericCode('4111-1111-1111-1111'), '4111111111111111', 'numeric code' );
+
+done_testing;