Don't require Digest::Crc32 for testing.

This commit is contained in:
Daniel Nichter
2012-02-07 15:06:06 -07:00
parent 8c27f618b7
commit 0659100b6b
2 changed files with 8 additions and 15 deletions

View File

@@ -102,21 +102,15 @@ is(make_checksum('hello world'), '93CB22BB8F5ACDC3', 'make_checksum');
# #############################################################################
# crc32() tests.
# #############################################################################
eval {
require Digest::Crc32;
};
SKIP: {
skip "Digest::Crc32 is not installed", 1 if $EVAL_ERROR;
my $crc = new Digest::Crc32();
# Our crc32 should match the one from which we copied it.
is(
crc32('Hello world'),
$crc->strcrc32("Hello world"),
"crc32"
);
};
# Our crc32 is copied from Digest::Crc32 which is not a common module,
# so we don't rely on it being installed. Instead, I just copied the
# original value from Digest::Crc32 into this test.
is(
crc32('Hello world'), # our crc32()
'2346098258', # original value from Digest::Crc32::strcrc32()
"crc32"
);
# #############################################################################
# any_unix_timestamp() tests.

View File

@@ -16,7 +16,6 @@ my @modules = qw(
Data::Dumper
DBD::mysql
DBI
Digest::Crc32
Digest::MD5
File::Basename
File::Find