Codebase list libcryptx-perl / 57cec1e
tuning tests Karel Miko 6 years ago
3 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
00 Changes for CryptX
11
22 0.056_* 2018-01-30
3 - speed-up (more stuff handled on XS level)
3 - significant speed-up (more stuff handled on XS level)
44 - Crypt::Checksum is deprecated in favour of Crypt::Checksum::Adler32 + Crypt::Checksum::CRC32
55
66 0.056 2017-12-22
3030 $m =~ s|[\\/]|::|g;
3131 $m =~ s|^lib::||;
3232 $m =~ s|\.pm$||;
33 push @err, "ERROR: '$m' is missing in CryptX.pm" unless $cryptx =~ /L<$m>/s || $m =~ /^(CryptX|Math::BigInt::LTM|Crypt::(PK|Mode|Mac|AuthEnc))$/;
33 push @err, "ERROR: '$m' is missing in CryptX.pm" unless $cryptx =~ /L<$m>/s || $m =~ /^(CryptX|Math::BigInt::LTM|Crypt::(PK|Mode|Mac|AuthEnc|Checksum))$/;
3434 push @err, "ERROR: '$m' is missing in 001_compile.t" unless $compile_t =~ /\nuse $m;/s;
3535 eval "use $m; 1;" or push @err, "ERROR: 'use $m' failed";
3636 }
00 use strict;
11 use warnings;
22
3 use Test::More tests => 54;
3 use Test::More tests => 56;
44
55 use Crypt::Checksum::Adler32 ':all';
66 use Crypt::Checksum::CRC32 ':all';
4646 is(adler32_file("t/data/binary-test.file"), pack("H*", "f35fb68a"));
4747 is(adler32_file_int("t/data/binary-test.file"), 4083136138);
4848 is(adler32_file_hex("t/data/binary-test.file"), "f35fb68a");
49 is(Crypt::Checksum::Adler32->new->addfile("t/data/binary-test.file")->hexdigest, "f35fb68a");
4950
5051 is(adler32_file_hex("t/data/text-CR.file"), "948e2644");
5152 is(adler32_file_hex("t/data/text-CRLF.file"), "3f0e2702");
9394 is(crc32_file("t/data/binary-test.file"), pack("H*", "24111fed"));
9495 is(crc32_file_int("t/data/binary-test.file"), 605102061);
9596 is(crc32_file_hex("t/data/binary-test.file"), "24111fed");
97 is(Crypt::Checksum::CRC32->new->addfile("t/data/binary-test.file")->hexdigest, "24111fed");
9698
9799 is(crc32_file_hex("t/data/text-CR.file"), "1ca430c6");
98100 is(crc32_file_hex("t/data/text-CRLF.file"), "4d434dfb");