Index: tests/natools-smaz_tests.adb ================================================================== --- tests/natools-smaz_tests.adb +++ tests/natools-smaz_tests.adb @@ -193,16 +193,18 @@ -- Test Suite for Each Base -- ------------------------------ procedure All_Tests_256 (Report : in out NT.Reporter'Class) is begin + Test_Validity_256 (Report); Sample_Strings_256 (Report); end All_Tests_256; procedure All_Tests_64 (Report : in out NT.Reporter'Class) is begin + Test_Validity_64 (Report); Sample_Strings_64 (Report); end All_Tests_64; @@ -251,10 +253,21 @@ exception when Error : others => Test.Report_Exception (Error); end Sample_Strings_256; + procedure Test_Validity_256 (Report : in out NT.Reporter'Class) is + Test : NT.Test := Report.Item ("Test dictionary validity"); + begin + if not Natools.Smaz_256.Is_Valid (Smaz_Original.Dictionary) then + Test.Fail; + end if; + exception + when Error : others => Test.Report_Exception (Error); + end Test_Validity_256; + + ------------------------------ -- Individual Base-64 Tests -- ------------------------------ @@ -267,6 +280,17 @@ -- imp* *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"); + begin + if not Natools.Smaz_64.Is_Valid (Dict_64) then + Test.Fail; + end if; + exception + when Error : others => Test.Report_Exception (Error); + end Test_Validity_64; + end Natools.Smaz_Tests; Index: tests/natools-smaz_tests.ads ================================================================== --- tests/natools-smaz_tests.ads +++ tests/natools-smaz_tests.ads @@ -24,9 +24,11 @@ procedure All_Tests_256 (Report : in out NT.Reporter'Class); procedure All_Tests_64 (Report : in out NT.Reporter'Class); procedure Sample_Strings_256 (Report : in out NT.Reporter'Class); + procedure Test_Validity_256 (Report : in out NT.Reporter'Class); procedure Sample_Strings_64 (Report : in out NT.Reporter'Class); + procedure Test_Validity_64 (Report : in out NT.Reporter'Class); end Natools.Smaz_Tests;