From: Karen Etheridge Date: Sat, 14 Mar 2015 18:38:40 +0000 (-0700) Subject: drop the use of fatal warnings in tests X-Git-Tag: v1.003004~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e1fb2f81fd0d4ea37c45c49073e317921be3e41;p=p5sagit%2FJSON-MaybeXS.git drop the use of fatal warnings in tests It can be a good idea to fatalize warnings for the author, but we do not want to block end-user installs if some new perl adds a warning that we did not predict. --- diff --git a/t/cpanel.t b/t/cpanel.t index bc2ec35..2beef29 100644 --- a/t/cpanel.t +++ b/t/cpanel.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::More; use JSON::MaybeXS; diff --git a/t/legacy.t b/t/legacy.t index fc28334..495d5e3 100644 --- a/t/legacy.t +++ b/t/legacy.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::Without::Module 'Cpanel::JSON::XS'; use Test::More; diff --git a/t/new.t b/t/new.t index 4ae4ada..d62e755 100644 --- a/t/new.t +++ b/t/new.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::More; use JSON::MaybeXS (); diff --git a/t/none.t b/t/none.t index 4b8aae5..9ef4ec3 100644 --- a/t/none.t +++ b/t/none.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::Without::Module 'Cpanel::JSON::XS'; use Test::Without::Module 'JSON::XS'; use Test::Without::Module 'JSON::PP'; diff --git a/t/pp.t b/t/pp.t index 94dc6ff..9a74a9e 100644 --- a/t/pp.t +++ b/t/pp.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::Without::Module 'Cpanel::JSON::XS', 'JSON::XS'; use if !eval { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP'; diff --git a/t/preload_cpanel.t b/t/preload_cpanel.t index 80b1e00..a740330 100644 --- a/t/preload_cpanel.t +++ b/t/preload_cpanel.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use if !eval { require Cpanel::JSON::XS; 1; }, 'Test::More', skip_all => 'No Cpanel::JSON::XS'; use Test::More; use JSON::MaybeXS; diff --git a/t/preload_xs.t b/t/preload_xs.t index 055381c..aecb88a 100644 --- a/t/preload_xs.t +++ b/t/preload_xs.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use if !eval { require JSON::XS; 1; }, 'Test::More', skip_all => 'No JSON::XS'; use Test::More; diff --git a/t/xs.t b/t/xs.t index 4a9248d..8e2b089 100644 --- a/t/xs.t +++ b/t/xs.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::Without::Module 'Cpanel::JSON::XS'; use Test::More; diff --git a/xt/json_pm.t b/xt/json_pm.t index 3a0891d..56beae9 100644 --- a/xt/json_pm.t +++ b/xt/json_pm.t @@ -1,5 +1,5 @@ use strict; -use warnings FATAL => 'all'; +use warnings; use Test::More; unless ( eval { require JSON; 1 } ) { diff --git a/xt/json_pm_legacy.t b/xt/json_pm_legacy.t index 716790c..3cd23e2 100644 --- a/xt/json_pm_legacy.t +++ b/xt/json_pm_legacy.t @@ -1,4 +1,4 @@ -use warnings FATAL => 'all'; +use warnings; use strict; use Test::More;