480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
-------------------------------
-- Individual Base-256 Tests --
-------------------------------
procedure Sample_Strings_256 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Roundtrip on sample strings");
begin
Roundtrip_Test (Test, Smaz_Original.Dictionary,
"This is a small string",
(254, 84, 76, 56, 172, 62, 173, 152, 62, 195, 70));
Roundtrip_Test (Test, Smaz_Original.Dictionary,
"foobar",
(220, 6, 90, 79));
|
|
|
>
|
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
|
-------------------------------
-- Individual Base-256 Tests --
-------------------------------
procedure Sample_Strings_VLV_256 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item
("Roundtrip on sample strings with variable-length verbatim");
begin
Roundtrip_Test (Test, Smaz_Original.Dictionary,
"This is a small string",
(254, 84, 76, 56, 172, 62, 173, 152, 62, 195, 70));
Roundtrip_Test (Test, Smaz_Original.Dictionary,
"foobar",
(220, 6, 90, 79));
|
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
48, 243, 152, 0, 255, 7, 49, 48, 32, 50, 48, 32, 51,
48, 161, 45, 60, 33, 166, 0, 231, 71, 151, 3, 3, 87));
Roundtrip_Test (Test, Smaz_Original.Dictionary,
": : : :",
(255, 6, 58, 32, 58, 32, 58, 32, 58));
exception
when Error : others => Test.Report_Exception (Error);
end Sample_Strings_256;
procedure Test_Validity_256 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Test dictionary validity");
begin
if not Natools.Smaz_256.Is_Valid (Smaz_Original.Dictionary) then
Test.Fail;
|
|
|
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
48, 243, 152, 0, 255, 7, 49, 48, 32, 50, 48, 32, 51,
48, 161, 45, 60, 33, 166, 0, 231, 71, 151, 3, 3, 87));
Roundtrip_Test (Test, Smaz_Original.Dictionary,
": : : :",
(255, 6, 58, 32, 58, 32, 58, 32, 58));
exception
when Error : others => Test.Report_Exception (Error);
end Sample_Strings_VLV_256;
procedure Test_Validity_256 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Test dictionary validity");
begin
if not Natools.Smaz_256.Is_Valid (Smaz_Original.Dictionary) then
Test.Fail;
|