citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 9fe28b247d419250c7787237900de785c50b3148
parent 3b13f16c89fd805abcfe91a9a80e2cfdf1b3ac83
Author: Kyle Milz <kyle@0x30.net>
Date:   Sat, 18 Feb 2017 16:28:59 -0700

t: use Modern::Perl instead of use {strict,warnings}

Diffstat:
Mt/check_baddir.t | 4+---
Mt/check_empty.t | 4+---
Mt/check_spaces.t | 4+---
Mt/e2e_ansi.t | 4+---
Mt/e2e_fail.t | 4+---
Mt/e2e_intent.t | 4+---
Mt/e2e_link_multiple.t | 4+---
Mt/e2e_nosrc.t | 4+---
Mt/gl_basic.t | 7++-----
Mt/inst_basic_link.t | 4+---
Mt/inst_binop.t | 4+---
Mt/inst_dowhile.t | 4+---
Mt/inst_fail.t | 4+---
Mt/inst_for.t | 4+---
Mt/inst_funcdef.t | 4+---
Mt/inst_if.t | 4+---
Mt/inst_log.t | 4+---
Mt/inst_logeol.t | 4+---
Mt/inst_macro.t | 4+---
Mt/inst_millis.t | 4+---
Mt/inst_nosrc.t | 4+---
Mt/inst_path.t | 4+---
Mt/inst_preamble.t | 4+---
Mt/inst_preprocess.t | 4+---
Mt/inst_return.t | 4+---
Mt/inst_srcext.t | 4+---
Mt/inst_switch.t | 4+---
Mt/inst_two_src.t | 4+---
Mt/inst_while.t | 4+---
Mt/lib_badver.t | 4+---
Mt/lib_deadcount.t | 4+---
Mt/lib_header.t | 4+---
Mt/lib_livecount.t | 4+---
Mt/lib_size.t | 4+---
Mt/lib_transunit.t | 4+---
Mt/mem.pm | 4+---
Mt/mem_unix.pm | 4+---
Mt/mem_win32.pm | 4+---
Mt/src_trailingspace.t | 4+---
Mt/term_basic.t | 2+-
Mt/utils.pm | 4+---
Mt/wrap_badarg.t | 4+---
Mt/wrap_cmake.t | 4+---
Mt/wrap_devenv.t | 3+--
Mt/wrap_exitcode.t | 4+---
Mt/wrap_jam.t | 4+---
Mt/wrap_make.t | 4+---
Mt/wrap_ninja.t | 4+---
Mt/wrap_nmake.t | 4+---
Mt/wrap_parallel.t | 4+---
Mt/www.t | 4+---
51 files changed, 52 insertions(+), 152 deletions(-)

diff --git a/t/check_baddir.t b/t/check_baddir.t @@ -1,9 +1,7 @@ # # Verify that passing a bad directory to citrun_check errors out. # -use strict; -use warnings; - +use Modern::Perl; use Test::Cmd; use Test::More; diff --git a/t/check_empty.t b/t/check_empty.t @@ -1,9 +1,7 @@ # # Verify the output when 0 citrun.log files are found. # -use strict; -use warnings; - +use Modern::Perl; use Test::Cmd; use Test::More; diff --git a/t/check_spaces.t b/t/check_spaces.t @@ -1,9 +1,7 @@ # # Verify citrun_check can handle paths with spaces when counting log files. # -use strict; -use warnings; - +use Modern::Perl; use Test::Cmd; use Test::More; diff --git a/t/e2e_ansi.t b/t/e2e_ansi.t @@ -2,9 +2,7 @@ # Check that instrumentation works when the -ansi flag is passed during # compilation. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/e2e_fail.t b/t/e2e_fail.t @@ -1,9 +1,7 @@ # # Check that a program that won't compile natively is handled properly. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/e2e_intent.t b/t/e2e_intent.t @@ -2,9 +2,7 @@ # Make sure the intention of a program isn't altered by instrumentation. # Show this by getting correct results from an instrumented program. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 11; diff --git a/t/e2e_link_multiple.t b/t/e2e_link_multiple.t @@ -1,9 +1,7 @@ # # Check that linking more than one instrumented object file together works. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/e2e_nosrc.t b/t/e2e_nosrc.t @@ -2,9 +2,7 @@ # Check that giving citrun_wrap a compile command with a non existent file is # handled. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/gl_basic.t b/t/gl_basic.t @@ -2,14 +2,11 @@ # Check that opening the viewer after an instrumented program has exited gives # an identical output to known good. # -use strict; -use warnings; - use File::Compare; use Imager; +use Modern::Perl; use t::utils; -plan skip_all => 'glew + osmesa required'; plan tests => 6; my $dir = setup_projdir(); @@ -22,7 +19,7 @@ is( $dir->stderr, '', 'is instrumented program stderr silent' ); my $render_file = File::Spec->catdir( $dir->workdir, 'test.tga' ); my $render_good_file = File::Spec->catfile( 't', 'gl_basic.tga' ); -$dir->run( prog => 'citrun_gltest', args => "$render_file 800 600", workdir => '' ); +$dir->run( prog => 'bin/citrun_gltest', args => "$render_file 800 600", workdir => '' ); print $dir->stdout; is( $dir->stderr, '', 'is citrun_gltest stderr silent' ); diff --git a/t/inst_basic_link.t b/t/inst_basic_link.t @@ -1,9 +1,7 @@ # # Check that the most basic of compile command lines works. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/inst_binop.t b/t/inst_binop.t @@ -1,9 +1,7 @@ # # Test that binary operators in strange cases work. Includes enums and globals. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_dowhile.t b/t/inst_dowhile.t @@ -1,9 +1,7 @@ # # Make sure that do while loop condition instrumentation works. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_fail.t b/t/inst_fail.t @@ -1,9 +1,7 @@ # # Check that a program that won't compile natively is handled properly. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 2; diff --git a/t/inst_for.t b/t/inst_for.t @@ -1,9 +1,7 @@ # # Test that for loop condition instrumenting works. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_funcdef.t b/t/inst_funcdef.t @@ -1,9 +1,7 @@ # # Check that really long function declarations are instrumented properly. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_if.t b/t/inst_if.t @@ -1,9 +1,7 @@ # # Check that if statement conditions are instrumented properly. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_log.t b/t/inst_log.t @@ -2,9 +2,7 @@ # Check that a raw citrun.log file is in good shape. # citrun_check relies on this output, and citrun_check is used quite a bit. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/inst_logeol.t b/t/inst_logeol.t @@ -1,9 +1,7 @@ # # Check that proper platform specific line endings exist in citrun.log. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 1; diff --git a/t/inst_macro.t b/t/inst_macro.t @@ -2,9 +2,7 @@ # Test for some tricky macro situations. In particular macro expansions at the # end of binary operators. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_millis.t b/t/inst_millis.t @@ -2,9 +2,7 @@ # The milliseconds spent processing line is always regex'ed out in other tests. # Do the opposite here and make sure it's there. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/inst_nosrc.t b/t/inst_nosrc.t @@ -1,9 +1,7 @@ # # Check that giving citrun_inst a non existent file is handled. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 2; diff --git a/t/inst_path.t b/t/inst_path.t @@ -3,9 +3,7 @@ # - TODO: not having PATH set errors # - not having CITRUN_PATH set when using transparent compile mode errors # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_preamble.t b/t/inst_preamble.t @@ -1,9 +1,7 @@ # # Test that the instrumentation preamble is what we think it is. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/inst_preprocess.t b/t/inst_preprocess.t @@ -1,9 +1,7 @@ # # Make sure preprocessor flags -E, -MM cause no instrumentation to be done. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 8; diff --git a/t/inst_return.t b/t/inst_return.t @@ -1,9 +1,7 @@ # # Check that return statement values (if any) are instrumented correctly. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_srcext.t b/t/inst_srcext.t @@ -1,9 +1,7 @@ # # Check that the advertised source file extensions work. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 15; diff --git a/t/inst_switch.t b/t/inst_switch.t @@ -1,9 +1,7 @@ # # Make sure that switch statement condition instrumentation works. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/inst_two_src.t b/t/inst_two_src.t @@ -2,9 +2,7 @@ # Check that two source files given on the same command line both get # instrumented fully. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 3; diff --git a/t/inst_while.t b/t/inst_while.t @@ -1,9 +1,7 @@ # # Make sure that while loop condition instrumentation works. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan tests => 4; diff --git a/t/lib_badver.t b/t/lib_badver.t @@ -2,9 +2,7 @@ # Check that linking object files of one citrun version with libcitrun of # another errors. # -use strict; -use warnings; - +use Modern::Perl; use t::utils; # os_compiler() plan tests => 4; diff --git a/t/lib_deadcount.t b/t/lib_deadcount.t @@ -2,9 +2,7 @@ # Test that a ran program outputs a memory file with correct line execution # counts. # -use strict; -use warnings; - +use Modern::Perl; use t::mem; use t::utils; plan tests => 8; diff --git a/t/lib_header.t b/t/lib_header.t @@ -1,9 +1,7 @@ # # Test that the shared memory header is what we expect. # -use strict; -use warnings; - +use Modern::Perl; use t::mem; use t::utils; plan tests => 18; diff --git a/t/lib_livecount.t b/t/lib_livecount.t @@ -1,9 +1,7 @@ # # Test that we can count an executing program as its running. # -use strict; -use warnings; - +use Modern::Perl; use Time::HiRes qw( time usleep ); use t::mem; use t::utils; diff --git a/t/lib_size.t b/t/lib_size.t @@ -1,9 +1,7 @@ # # Test that the runtime shared file size is what we expect. # -use strict; -use warnings; - +use Modern::Perl; use t::mem; use t::utils; plan tests => 6; diff --git a/t/lib_transunit.t b/t/lib_transunit.t @@ -1,9 +1,7 @@ # # Test that the shared memory translation units are what we expect. # -use strict; -use warnings; - +use Modern::Perl; use t::mem; use t::utils; plan tests => 14; diff --git a/t/mem.pm b/t/mem.pm @@ -1,9 +1,7 @@ package t::mem; -use strict; -use warnings; - use Inline 'C'; +use Modern::Perl; use POSIX; use if $^O eq 'MSWin32', 't::mem_win32'; use if $^O ne 'MSWin32', 't::mem_unix'; diff --git a/t/mem_unix.pm b/t/mem_unix.pm @@ -1,8 +1,6 @@ package t::mem; -use strict; -use warnings; - +use Modern::Perl; use POSIX; use Sys::Mmap; use autodie; diff --git a/t/mem_win32.pm b/t/mem_win32.pm @@ -1,8 +1,6 @@ package t::mem; -use strict; -use warnings; - +use Modern::Perl; use POSIX; # NULL use Win32::API; use autodie; diff --git a/t/src_trailingspace.t b/t/src_trailingspace.t @@ -1,9 +1,7 @@ # # Test that source files have no trailing whitespace. # -use strict; -use warnings; - +use Modern::Perl; use Test::More tests => 1; use Test::TrailingSpace; diff --git a/t/term_basic.t b/t/term_basic.t @@ -1,4 +1,4 @@ -use strict; +use Modern::Perl; use Test::More skip_all => "citrun_term not compiled"; use Expect; use test::project; diff --git a/t/utils.pm b/t/utils.pm @@ -1,7 +1,5 @@ -use strict; -use warnings; - use if $^O eq "MSWin32", 'File::DosGlob' => 'glob'; +use Modern::Perl; use Test::Cmd; use Test::Differences; use Test::More; diff --git a/t/wrap_badarg.t b/t/wrap_badarg.t @@ -1,9 +1,7 @@ # # Make sure calling citrun_wrap with arguments fails. # -use strict; -use warnings; - +use Modern::Perl; use Test::Cmd; use Test::More tests => 3; diff --git a/t/wrap_cmake.t b/t/wrap_cmake.t @@ -1,10 +1,8 @@ # # Test that wrapping the 'cmake' build system produces instrumented binaries. # -use strict; -use warnings; - use File::Which; +use Modern::Perl; use t::utils; plan skip_all => 'cmake not found' unless (which 'cmake'); diff --git a/t/wrap_devenv.t b/t/wrap_devenv.t @@ -2,8 +2,7 @@ # Try and wrap devenv with citrun_wrap. # TODO: devenv uses response files (not supported right now). # -use strict; -use warnings; +use Modern::Perl; use t::utils; if ($^O eq "MSWin32") { diff --git a/t/wrap_exitcode.t b/t/wrap_exitcode.t @@ -1,9 +1,7 @@ # # Make sure that citrun_wrap exits with the same code as the native build. # -use strict; -use warnings; - +use Modern::Perl; use Test::Cmd; use Test::More tests => 3; diff --git a/t/wrap_jam.t b/t/wrap_jam.t @@ -1,10 +1,8 @@ # # Test that wrapping the 'jam' build system produces instrumented binaries. # -use strict; -use warnings; - use File::Which; +use Modern::Perl; use t::utils; plan skip_all => 'jam not found' unless (which 'jam'); diff --git a/t/wrap_make.t b/t/wrap_make.t @@ -1,10 +1,8 @@ # # Test that wrapping the 'make' build system produces instrumented binaries. # -use strict; -use warnings; - use File::Which; +use Modern::Perl; use t::utils; plan skip_all => 'make not found' unless (which 'make'); diff --git a/t/wrap_ninja.t b/t/wrap_ninja.t @@ -1,10 +1,8 @@ # # Test that wrapping the 'ninja' build system produces instrumented binaries. # -use strict; -use warnings; - use File::Which; +use Modern::Perl; use t::utils; plan skip_all => 'ninja not found' unless (which 'ninja'); diff --git a/t/wrap_nmake.t b/t/wrap_nmake.t @@ -1,6 +1,4 @@ -use strict; -use warnings; - +use Modern::Perl; use t::utils; plan skip_all => 'win32 only' if ($^O ne "MSWin32"); diff --git a/t/wrap_parallel.t b/t/wrap_parallel.t @@ -2,10 +2,8 @@ # Check that calling citrun_inst in parallel doesn't cause any obviously bad # things to happen. # -use strict; -use warnings; - use File::Which; +use Modern::Perl; use t::utils; plan skip_all => 'make not found' unless (which 'make'); diff --git a/t/www.t b/t/www.t @@ -1,9 +1,7 @@ # # Test live website has correct html and no broken links. # -use strict; -use warnings; - +use Modern::Perl; use Test::More skip_all => 'utf8 index false positive'; use Test::WWW::Mechanize;