From: Karen Etheridge <ether@cpan.org>
Date: Sun, 10 Feb 2013 00:40:18 +0000 (-0800)
Subject: make all warnings fatal in tests
X-Git-Tag: v0.55~3
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aec092482d5b90b8279e4a5f92165868a78ddf32;p=gitmo%2FMooseX-Getopt.git

make all warnings fatal in tests
---

diff --git a/t/000_load.t b/t/000_load.t
index 3aec9d2..1f3cfb8 100644
--- a/t/000_load.t
+++ b/t/000_load.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 2;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/001_basic.t b/t/001_basic.t
index 2a2f94e..2d5eb1b 100644
--- a/t/001_basic.t
+++ b/t/001_basic.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 70;
 use Test::Moose;
diff --git a/t/002_custom_option_type.t b/t/002_custom_option_type.t
index 596a5f9..5c0eb90 100644
--- a/t/002_custom_option_type.t
+++ b/t/002_custom_option_type.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 7;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/003_inferred_option_type.t b/t/003_inferred_option_type.t
index 01cd599..8953926 100644
--- a/t/003_inferred_option_type.t
+++ b/t/003_inferred_option_type.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 6;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/004_nogetop.t b/t/004_nogetop.t
index fd1ecdf..148682e 100644
--- a/t/004_nogetop.t
+++ b/t/004_nogetop.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 10;
 use Test::Fatal 0.003;
diff --git a/t/005_strict.t b/t/005_strict.t
index 9c79115..f768d8b 100644
--- a/t/005_strict.t
+++ b/t/005_strict.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 11;
 use Test::Fatal;
diff --git a/t/006_metaclass_traits.t b/t/006_metaclass_traits.t
index 478e7ad..848fe53 100644
--- a/t/006_metaclass_traits.t
+++ b/t/006_metaclass_traits.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 70;
 use Test::Moose;
diff --git a/t/007_nogetopt_trait.t b/t/007_nogetopt_trait.t
index 540b1b4..22f27cd 100644
--- a/t/007_nogetopt_trait.t
+++ b/t/007_nogetopt_trait.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 10;
 use Test::Fatal;
diff --git a/t/008_configfromfile.t b/t/008_configfromfile.t
index c38d314..39798a2 100644
--- a/t/008_configfromfile.t
+++ b/t/008_configfromfile.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::Requires 'MooseX::ConfigFromFile';    # skip all if not installed
 use Test::More tests => 56;
diff --git a/t/009_gld_and_explicit_options.t b/t/009_gld_and_explicit_options.t
index fc3d3bb..2d46662 100644
--- a/t/009_gld_and_explicit_options.t
+++ b/t/009_gld_and_explicit_options.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 6;
 use Test::Fatal;
diff --git a/t/010_dashes.t b/t/010_dashes.t
index 004ca71..68f9a34 100644
--- a/t/010_dashes.t
+++ b/t/010_dashes.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 8;
 use Test::Fatal;
diff --git a/t/011_process_argv.t b/t/011_process_argv.t
index 4fb220f..99dc8e6 100644
--- a/t/011_process_argv.t
+++ b/t/011_process_argv.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 7;
 use Test::Fatal 0.003;
diff --git a/t/100_gld_default_bug.t b/t/100_gld_default_bug.t
index fb1b13f..54312f2 100644
--- a/t/100_gld_default_bug.t
+++ b/t/100_gld_default_bug.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 6;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/101_argv_bug.t b/t/101_argv_bug.t
index 318291c..3de40e4 100644
--- a/t/101_argv_bug.t
+++ b/t/101_argv_bug.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 4;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/102_basic_basic.t b/t/102_basic_basic.t
index d89e479..49042ea 100644
--- a/t/102_basic_basic.t
+++ b/t/102_basic_basic.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 70;
 use Test::Moose;
diff --git a/t/103_uc_bug.t b/t/103_uc_bug.t
index b9e694e..e6fa0f6 100644
--- a/t/103_uc_bug.t
+++ b/t/103_uc_bug.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 4;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/104_override_usage.t b/t/104_override_usage.t
index 8fa9299..091b47b 100644
--- a/t/104_override_usage.t
+++ b/t/104_override_usage.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 7;
 use Test::Trap;
diff --git a/t/105_uc_bug_more.t b/t/105_uc_bug_more.t
index 5c11042..0b54994 100644
--- a/t/105_uc_bug_more.t
+++ b/t/105_uc_bug_more.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 13;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/106_no_ignore_case.t b/t/106_no_ignore_case.t
index e9e1659..1e8f425 100644
--- a/t/106_no_ignore_case.t
+++ b/t/106_no_ignore_case.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 22;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/107_no_auto_help.t b/t/107_no_auto_help.t
index 638f1a5..3cb1aec 100644
--- a/t/107_no_auto_help.t
+++ b/t/107_no_auto_help.t
@@ -9,7 +9,7 @@
 # when --help is passed (and MooseX::ConfigFromFile is in use).
 
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::Requires { 'MooseX::SimpleConfig' => 0.07 };  # skip all if not installed
 use Test::More tests => 2;
@@ -21,7 +21,7 @@ use Test::NoWarnings 1.04 ':early';
 my $fail_on_exit = 1;
 {
     package Class;
-    use strict; use warnings;
+    use strict; use warnings FATAL => 'all';
 
     use Moose;
     with
diff --git a/t/107_union_bug.t b/t/107_union_bug.t
index a1d4b7c..653f012 100644
--- a/t/107_union_bug.t
+++ b/t/107_union_bug.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 6;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/108_usage_attr.t b/t/108_usage_attr.t
index 3fd6c4d..0f24131 100644
--- a/t/108_usage_attr.t
+++ b/t/108_usage_attr.t
@@ -3,13 +3,13 @@
 
 # This tests the fix (that fulfills the documentation claim).
 
-use strict; use warnings;
+use strict; use warnings FATAL => 'all';
 use Test::More tests => 4;
 use Test::NoWarnings 1.04 ':early';
 
 {
     package MyClass;
-    use strict; use warnings;
+    use strict; use warnings FATAL => 'all';
     use Moose;
     with 'MooseX::Getopt';
 }
diff --git a/t/109_help_flag.t b/t/109_help_flag.t
index 33390de..a9b8756 100644
--- a/t/109_help_flag.t
+++ b/t/109_help_flag.t
@@ -16,14 +16,14 @@
 
 # Update: since 0.41, usage info is printed to stdout, not stderr.
 
-use strict; use warnings;
+use strict; use warnings FATAL => 'all';
 use Test::More tests => 23;
 use Test::NoWarnings 1.04 ':early';
 use Test::Trap;
 
 {
     package MyClass;
-    use strict; use warnings;
+    use strict; use warnings FATAL => 'all';
     use Moose;
     with 'MooseX::Getopt';
 }
diff --git a/t/110_sort_usage_by_attr_order.t b/t/110_sort_usage_by_attr_order.t
index c424add..c6511bf 100644
--- a/t/110_sort_usage_by_attr_order.t
+++ b/t/110_sort_usage_by_attr_order.t
@@ -8,13 +8,13 @@
 # early), followed by options added by parent classes and roles, and then
 # options added by this class.
 
-use strict; use warnings;
+use strict; use warnings FATAL => 'all';
 use Test::More tests => 2;
 use Test::NoWarnings 1.04 ':early';
 
 {
     package MyClass;
-    use strict; use warnings;
+    use strict; use warnings FATAL => 'all';
     use Moose;
     with 'MooseX::Getopt';
 
diff --git a/t/111_gld_pass_through.t b/t/111_gld_pass_through.t
index d179f1a..c4f7401 100644
--- a/t/111_gld_pass_through.t
+++ b/t/111_gld_pass_through.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 use Test::More tests => 6;
 use Test::NoWarnings 1.04 ':early';
diff --git a/t/112_configfile_constructor_arg.t b/t/112_configfile_constructor_arg.t
index d17c2d4..cc441f3 100644
--- a/t/112_configfile_constructor_arg.t
+++ b/t/112_configfile_constructor_arg.t
@@ -1,5 +1,5 @@
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
 # respect the configfile value passed into the constructor.