Skip to content

Commit

Permalink
Cleanup test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevieb9 authored and xsawyerx committed Mar 6, 2016
1 parent b87ebfa commit 1819df0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions t/09-ping_hires.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,14 @@ SKIP: {
$Test::Ping::PROTO = 'tcp';
create_ping_object_ok( 'tcp', 'Create proper Net::Ping object' );

# xsawyerx: the original test does this
# checks that it's disabled, then enabled and disables and enabled again

# these are internal package variables of Net::Ping
# and not hash keys, so they have to be tested this way

cmp_ok( $Test::Ping::HIRES, '==', 1, 'Default is to use Time::HiRes' );
cmp_ok( $Test::Ping::HIRES, '==', 1, 'Net::Ping uses Time::HiRes by default' );
$Test::Ping::HIRES = 0;
cmp_ok( $Test::Ping::HIRES, '==', 0, 'Disable HIRES' );
cmp_ok( $Test::Ping::HIRES, '==', 0, 'Disabling HIRES works' );
$Test::Ping::HIRES = 1;
cmp_ok( $Test::Ping::HIRES, '==', 1, 'Make sure re-enable works' );
cmp_ok( $Test::Ping::HIRES, '==', 1, 'Re-enabling HIRES works' );

my ( $ret, $duration ) =
ping_ok( 'localhost', 'Test on the default port' );
Expand Down

0 comments on commit 1819df0

Please sign in to comment.