Natools

Check-in [c0e42e8031]
Login
Overview
Comment:smaz_tests: add tests to fully cover non-variable-verbatim code
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c0e42e803108556688192c5aa6b2a83cc46f795f
User & Date: nat on 2016-12-26 20:00:50
Other Links: manifest | tags
Context
2016-12-27
21:28
smaz_tests: fix message of exceptions during decompression roundtrip check-in: 77d59bd0f4 user: nat tags: trunk
2016-12-26
20:00
smaz_tests: add tests to fully cover non-variable-verbatim code check-in: c0e42e8031 user: nat tags: trunk
2016-12-25
21:39
smaz_tests: add dictionary validity tests check-in: bc33d2a603 user: nat tags: trunk
Changes

Modified tests/natools-smaz_tests.adb from [627384dccb] to [de7679f0cf].

274
275
276
277
278
279
280























281
282
283
284
285
286
287
   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"));
         --       <S>imp* <T>*t























   exception
      when Error : others => Test.Report_Exception (Error);
   end Sample_Strings_64;


   procedure Test_Validity_64 (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Test dictionary validity");







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
   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"));
         --       <S>imp* <T>*t
      Roundtrip_Test (Test, Dict_64,
         "SiT",
         To_SEA ("/ATlGV"));
         --        <SiT>  smaller than <S>i<T> ("+TBG+UB")
      Roundtrip_Test (Test, Dict_64,
         "sIMple TEST_WITH_14_B",
         To_SEA ("D9J1EVYA8UVETR1XXlEVI9VM08lQ"));
         --       s<IM>p* <TE ST_ WIT H_1 4_B>
         --  TE   001010_10  1010_0010  00
         --  ST_  110010_10  0010_1010  11_111010
         --  WIT  111010_10  1001_0010  00_101010
         --  H_1  000100_10  1111_1010  10_001100
         --  4_B  001011_00  1111_1010  01_000010
      Roundtrip_Test (Test, Dict_64,
         "'7B_Verbatim'",
         To_SEA ("0+3IC9lVlJnYF1S0"));
         --       '<7B_Verb  >a*m'
         --  7    111011_00  0100
         --  B_V  010000_10  1111_1010  01_101010
         --  erb  101001_10  0100_1110  01_000110
         --  "erb" could have been encoded separately as "o+iB", which has
         --  the same length, but the tie is broken in favor of the longer
         --  verbatim fragment to help with corner cases.
   exception
      when Error : others => Test.Report_Exception (Error);
   end Sample_Strings_64;


   procedure Test_Validity_64 (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Test dictionary validity");