Natools

Check-in [97980e3f18]
Login
Overview
Comment:smaz_tests: fix endianness of the hand-encoded base-4096 streams
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 97980e3f18675c6b517cbb9a173940a85671a4e1
User & Date: nat on 2017-02-04 22:25:01
Other Links: manifest | tags
Context
2017-02-05
22:42
smaz_tests: fix a mistake in a hand-made expected base-4096 stream check-in: 18dc02b3a0 user: nat tags: trunk
2017-02-04
22:25
smaz_tests: fix endianness of the hand-encoded base-4096 streams check-in: 97980e3f18 user: nat tags: trunk
2017-02-03
21:08
smaz_tests: fix base-4096 sample string test by actually calling it check-in: b4e3aec058 user: nat tags: trunk
Changes

Modified tests/natools-smaz_tests.adb from [86f3ec8f2c] to [9da659b0ad].

495
496
497
498
499
500
501
502

503
504
505

506
507
508

509
510
511

512
513
514

515
516
517
518
519


520
521
522
523


524
525
526
527


528
529
530

531
532
533
534
535
536
537
495
496
497
498
499
500
501

502
503
504

505
506
507

508
509
510

511
512
513

514
515
516
517


518
519
520
521


522
523
524
525


526
527
528
529

530
531
532
533
534
535
536
537







-
+


-
+


-
+


-
+


-
+



-
-
+
+


-
-
+
+


-
-
+
+


-
+







     (Report : in out NT.Reporter'Class;
      Dictionary : in Smaz_4096.Dictionary)
   is
      Test : NT.Test := Report.Item ("Roundtrip on sample strings");
   begin
      Roundtrip_Test (Test, Dictionary,
         "This is a small string",
         To_SEA ("yJYuAgYuAgBhAgcsVXBsAgczcOak"));
         To_SEA ("JyuYgAuYgAhBgAscXVsBgAzcOcka"));
      Roundtrip_Test (Test, Dictionary,
         "foobar",
         To_SEA ("Xca5Vd"));
         To_SEA ("cX5adV"));
      Roundtrip_Test (Test, Dictionary,
         "the end",
         To_SEA ("dBBlAgXBBk"));
         To_SEA ("BdlBgABXkB"));
      Roundtrip_Test (Test, Dictionary,
         "not-a-g00d-Exampl333",
         To_SEA ("asB0AtBhAtBnEABkAtsTVYbdKx"));
         To_SEA ("sa0BtAhBtAnBAEkBtATsYVdbxK"));
      Roundtrip_Test (Test, Dictionary,
         "Smaz is a simple compression library",
         To_SEA ("x0VlAgYuAgBhAgcoaTAgWOaTcKcyYqBuAgZyV3VdB5"));
         To_SEA ("0xlVgAuYgAhBgAocTagAOWTaKcycqYuBgAyZ3VdV5B"));
      Roundtrip_Test (Test, Dictionary,
         "Nothing is more difficult, and therefore more precious, "
           & "than to be able to decide",
         To_SEA ("v0dBYpBnAgYuAgaScKAgWiXTYedfB0AsAgVZBkAgdBXFW5bJBlAgaScKAg"
           & "bjW2YqdmAsAgdBVZAgdIAgVqAgVNZuAgdIAgWeWIWe"));
         To_SEA ("0vBdpYnBgAuYgASaKcgAiWTXeYfd0BsAgAZVkBgABdFX5WJblBgASaKcgA"
           & "jb2WqYmdsAgABdZVgAIdgAqVgANVuZgAIdgAeWIWeW"));
      Roundtrip_Test (Test, Dictionary,
         "this is an example of what works very well with smaz",
         To_SEA ("dBYuAgYuAgVZAgXLVYbdBlAga9AgePVfAgeWcQBzAgdyceAgeMZ1Ag"
           & "eQdBAgcsVl"));
         To_SEA ("BduYgAuYgAZVgALXYVdblBgA9agAPefVgAWeQczBgAydecgAMe1ZgA"
           & "QeBdgAsclV"));
      Roundtrip_Test (Test, Dictionary,
         "1000 numbers 2000 will 10 20 30 compress very little",
         To_SEA ("HIAwAgayaFXFBzAgIsAwAgeQZ1AgEKAgEUAgEeAgWOaTcKcyAg"
           & "dyceAgZydNZu"));
         To_SEA ("IHwAgAyaFaFXzBgAsIwAgAQe1ZgAKEgAUEgAeEgAOWTaKcycgA"
           & "ydecgAyZNduZ"));
      Roundtrip_Test (Test, Dictionary,
         ": : : :",
         To_SEA ("/5OiA6IDogOgo"));
         To_SEA ("5/OiA6IDogOgo"));
   exception
      when Error : others => Test.Report_Exception (Error);
   end Sample_Strings_4096;


   procedure Sample_Strings_4096 (Report : in out NT.Reporter'Class) is
   begin