Differences From Artifact [03fb241432]:
- File tests/natools-smaz-tests.adb — part of check-in [eee21b3a8c] at 2016-09-13 20:27:10 on branch trunk — smaz-tests: add a basic Smaz test, using simple common strings (user: nat, size: 5985) [annotate] [blame] [check-ins using]
To Artifact [f615a75ea1]:
- File
tests/natools-smaz-tests.adb
— part of check-in
[e2fbcb314b]
at
2016-09-14 21:44:56
on branch trunk
— 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 (user: nat, size: 5993) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
76 77 78 79 80 81 82 | declare Buffer_2 : String (1 .. Decompressed_Length (Dict, Buffer (1 .. Last))); Last_2 : Natural; Done : Boolean := False; begin begin | | | 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; |
︙ | ︙ |