tuning tests
Karel Miko
6 years ago
0 | 0 |
Changes for CryptX
|
1 | 1 |
|
2 | 2 |
0.056_* 2018-01-30
|
3 | |
- speed-up (more stuff handled on XS level)
|
|
3 |
- significant speed-up (more stuff handled on XS level)
|
4 | 4 |
- Crypt::Checksum is deprecated in favour of Crypt::Checksum::Adler32 + Crypt::Checksum::CRC32
|
5 | 5 |
|
6 | 6 |
0.056 2017-12-22
|
30 | 30 |
$m =~ s|[\\/]|::|g;
|
31 | 31 |
$m =~ s|^lib::||;
|
32 | 32 |
$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))$/;
|
34 | 34 |
push @err, "ERROR: '$m' is missing in 001_compile.t" unless $compile_t =~ /\nuse $m;/s;
|
35 | 35 |
eval "use $m; 1;" or push @err, "ERROR: 'use $m' failed";
|
36 | 36 |
}
|
0 | 0 |
use strict;
|
1 | 1 |
use warnings;
|
2 | 2 |
|
3 | |
use Test::More tests => 54;
|
|
3 |
use Test::More tests => 56;
|
4 | 4 |
|
5 | 5 |
use Crypt::Checksum::Adler32 ':all';
|
6 | 6 |
use Crypt::Checksum::CRC32 ':all';
|
|
46 | 46 |
is(adler32_file("t/data/binary-test.file"), pack("H*", "f35fb68a"));
|
47 | 47 |
is(adler32_file_int("t/data/binary-test.file"), 4083136138);
|
48 | 48 |
is(adler32_file_hex("t/data/binary-test.file"), "f35fb68a");
|
|
49 |
is(Crypt::Checksum::Adler32->new->addfile("t/data/binary-test.file")->hexdigest, "f35fb68a");
|
49 | 50 |
|
50 | 51 |
is(adler32_file_hex("t/data/text-CR.file"), "948e2644");
|
51 | 52 |
is(adler32_file_hex("t/data/text-CRLF.file"), "3f0e2702");
|
|
93 | 94 |
is(crc32_file("t/data/binary-test.file"), pack("H*", "24111fed"));
|
94 | 95 |
is(crc32_file_int("t/data/binary-test.file"), 605102061);
|
95 | 96 |
is(crc32_file_hex("t/data/binary-test.file"), "24111fed");
|
|
97 |
is(Crypt::Checksum::CRC32->new->addfile("t/data/binary-test.file")->hexdigest, "24111fed");
|
96 | 98 |
|
97 | 99 |
is(crc32_file_hex("t/data/text-CR.file"), "1ca430c6");
|
98 | 100 |
is(crc32_file_hex("t/data/text-CRLF.file"), "4d434dfb");
|