Natools

Check-in [e2fbcb314b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:smaz-tests: make round-trip test really a round-trip

Since there are multiple encoded sequence that decompress into the same original string, it is much more important to check that compressed data really decompress into the original data than to check that it matches exactly the expected byte sequence

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e2fbcb314b46d9e7fcdb6b2472aab32ec6527000
User & Date: nat 2016-09-14 21:44:56
Context
2016-09-16
19:59
smaz: merge verbatim blocks when it improves compression check-in: 90bba135f9 user: nat tags: trunk
2016-09-14
21:44
smaz-tests: make round-trip test really a round-trip

Since there are multiple encoded sequence that decompress into the same original string, it is much more important to check that compressed data really decompress into the original data than to check that it matches exactly the expected byte sequence check-in: e2fbcb314b user: nat tags: trunk

2016-09-13
20:27
smaz-tests: add a basic Smaz test, using simple common strings check-in: eee21b3a8c user: nat tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/natools-smaz-tests.adb.

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
      declare
         Buffer_2 : String
           (1 .. Decompressed_Length (Dict, Buffer (1 .. Last)));
         Last_2 : Natural;
         Done : Boolean := False;
      begin
         begin
            Decompress (Dict, Compressed, Buffer_2, Last_2);
            Done := True;
         exception
            when Error : others =>
               Test.Info ("During compression of """ & Decompressed & '"');
               Test.Report_Exception (Error, NT.Fail);
         end;








|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
      declare
         Buffer_2 : String
           (1 .. Decompressed_Length (Dict, Buffer (1 .. Last)));
         Last_2 : Natural;
         Done : Boolean := False;
      begin
         begin
            Decompress (Dict, Buffer (1 .. Last), Buffer_2, Last_2);
            Done := True;
         exception
            when Error : others =>
               Test.Info ("During compression of """ & Decompressed & '"');
               Test.Report_Exception (Error, NT.Fail);
         end;