483
484
485
486
487
488
489
490
491
492
493
494
495
496
|
procedure All_Tests_64 (Report : in out NT.Reporter'Class) is
begin
Test_Validity_64 (Report);
Sample_Strings_64 (Report);
Sample_Strings_VLV_64 (Report);
end All_Tests_64;
-------------------------------
-- Individual Base-256 Tests --
-------------------------------
|
>
|
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
|
procedure All_Tests_64 (Report : in out NT.Reporter'Class) is
begin
Test_Validity_64 (Report);
Sample_Strings_64 (Report);
Sample_Strings_VLV_64 (Report);
Impure_Stream_64 (Report);
end All_Tests_64;
-------------------------------
-- Individual Base-256 Tests --
-------------------------------
|
757
758
759
760
761
762
763
764
765
766
767
768
769
770
|
end Test_Validity_4096;
------------------------------
-- Individual Base-64 Tests --
------------------------------
procedure Sample_Strings_64 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Roundtrip on sample strings");
begin
Roundtrip_Test (Test, Dict_64,
"Simple Test",
To_SEA ("+TBGSVYA+UBQE"));
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
|
end Test_Validity_4096;
------------------------------
-- Individual Base-64 Tests --
------------------------------
procedure Impure_Stream_64 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Input stream with non-base-64 symbols");
begin
declare
CRLF : constant String := (Character'Val (13), Character'Val (10));
Input : constant Ada.Streams.Stream_Element_Array
:= To_SEA ("090kTgIW enLK3NFE FAEKs/Ao" & CRLF
& "92dAFAzo +iBF1Sep HOvDJB0=");
Output : constant String := Smaz_64.Decompress (Dict_64, Input);
Expected : constant String
:= "'49 bytes of data to show a verbatim count issue'";
begin
if Output /= Expected then
Test.Fail ("Bad decompression");
Test.Info ("Found: """ & Output & '"');
Test.Info ("Expected:""" & Expected & '"');
end if;
end;
exception
when Error : others => Test.Report_Exception (Error);
end Impure_Stream_64;
procedure Sample_Strings_64 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Roundtrip on sample strings");
begin
Roundtrip_Test (Test, Dict_64,
"Simple Test",
To_SEA ("+TBGSVYA+UBQE"));
|