DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦1ad6f5cc9⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Basic_Alpha_Numeric_Underscore_String_Tests, seg_02bb07

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Log;
with Profile;
with String_Operations;
with Tms;
procedure Basic_Alpha_Numeric_Underscore_String_Tests is

    package So renames String_Operations;

    type Test_Result is (Pass, Fail);
    Result : Test_Result := Pass;

begin

    if So.Is_Alpha_Numeric_Underscore_String ("") then
        Log.Put_Line ("Failed null string test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("_") then
        Log.Put_Line ("Failed single underscore test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("__") then
        Log.Put_Line ("Failed double underscore test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if So.Is_Alpha_Numeric_Underscore_String ("ad_ABAE028#aaru26mAA") then
        Log.Put_Line ("Failed embedded non-alpha_numeric_underscore test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if So.Is_Alpha_Numeric_Underscore_String ("$_7shNNNTsh66") then
        Log.Put_Line ("Failed leading non-alpha_numeric_underscore test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if So.Is_Alpha_Numeric_Underscore_String ("02627GARYhs5gaj_uuu+") then
        Log.Put_Line ("Failed ending non-alpha_numeric_underscore test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("a") then
        Log.Put_Line ("Failed single alpha test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("0") then
        Log.Put_Line ("Failed single numeric test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("aA") then
        Log.Put_Line ("Failed 2 char alpha test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("96") then
        Log.Put_Line ("Failed 2 char numeric test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("abelcigmrerghepqermb") then       Log.Put_Line ("Failed ""random"" alpha string test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("12345678900987654321") then
        Log.Put_Line ("Failed ""random"" numeric string test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("0asderv") then
        Log.Put_Line ("Failed leading char numeric test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("_0asderv") then
        Log.Put_Line ("Failed leading char underscore test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("agadaraa0") then
        Log.Put_Line ("Failed failed ending numeric char test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("agadaraa0_") then
        Log.Put_Line ("Failed failed ending underscore char test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String ("sdradramg8asd_rarul") then
        Log.Put_Line ("Failed embedded underscore_numeric char test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_Underscore_String
              ("aZ_saD2d_ra6JWR9a0_2145NJWmGf") then
        Log.Put_Line ("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;

end Basic_Alpha_Numeric_Underscore_String_Tests;

E3 Meta Data

    nblk1=6
    nid=0
    hdr6=c
        [0x00] rec0=21 rec1=00 rec2=01 rec3=01a
        [0x01] rec0=19 rec1=00 rec2=02 rec3=052
        [0x02] rec0=1c rec1=00 rec2=03 rec3=002
        [0x03] rec0=18 rec1=00 rec2=04 rec3=020
        [0x04] rec0=1a rec1=00 rec2=05 rec3=030
        [0x05] rec0=11 rec1=00 rec2=06 rec3=000
    tail 0x217248a2c83f080920d0f 0x42a00088462060003