|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Basic_Alpha_String_Tests, seg_02bb09
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Log; with Profile; with String_Operations; with String_Utilities; with Tms; procedure Basic_Alpha_String_Tests (Test_Constraints : String := "RUN_ALL") is package So renames String_Operations; type Test_Result is (Pass, Fail); Result : Test_Result := Pass; begin if String_Utilities.Upper_Case (Test_Constraints) = "RUN_ALL" then if So.Is_Alpha_String ("") then Log.Put_Line (Message => "Failed null string test", Kind => Profile.Error_Msg, Response => Profile.Get); Result := Fail; end if; if So.Is_Alpha_String ("0") then Log.Put_Line ("Failed single numeric test", Kind => Profile.Error_Msg); Result := Fail; end if; if So.Is_Alpha_String ("_") then Log.Put_Line ("Failed single underscore test", Kind => Profile.Error_Msg); Result := Fail; end if; if not So.Is_Alpha_String ("a") then Log.Put_Line ("Failed single alpha test", Kind => Profile.Error_Msg); Result := Fail; end if; if not So.Is_Alpha_String ("aA") then Log.Put_Line ("Failed 2 char alpha test", Kind => Profile.Error_Msg); Result := Fail; end if; end if; if not So.Is_Alpha_String ("abelcigmrerghepqermb") then Log.Put_Line ("Failed ""random"" alpha string test", Kind => Profile.Error_Msg); Result := Fail; end if; if So.Is_Alpha_String ("0asderv") then Log.Put_Line ("Failed leading char non-alpha char test", Kind => Profile.Error_Msg); Result := Fail; end if; if So.Is_Alpha_String ("agadaraa/") then Log.Put_Line ("Failed failed ending non-alpah char test", Kind => Profile.Error_Msg); Result := Fail; end if; if So.Is_Alpha_String ("sdradramg asdrarul") then Log.Put_Line ("Failed embedded non-alpha char test"); Result := Fail; end if; if not So.Is_Alpha_String ("aZsaDdraJWRaNJWmGf") then Log.Put_Line (Message => "Failed mixed upper-lower case char test", Kind => Profile.Error_Msg, Response => Profile.Get); Result := Fail; end if; if Result = Pass then Tms.Register_Result (The_Result => Tms.Pass, Test_Run_Name => "<CURRENT TEST RUN>", Test_Case_Name => "<CURRENT TEST CASE>"); else Tms.Register_Result (The_Result => Tms.Fail, Test_Run_Name => "<CURRENT TEST RUN>", Test_Case_Name => "<CURRENT TEST CASE>"); end if; nd Basic_Alpha_String_Tests;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=21 rec1=00 rec2=01 rec3=05c [0x01] rec0=1f rec1=00 rec2=02 rec3=058 [0x02] rec0=1b rec1=00 rec2=03 rec3=002 [0x03] rec0=01 rec1=00 rec2=04 rec3=001 tail 0x215240fce83f08096ffa0 0x42a00088462060003