DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦6d1b7c842⟧ TextFile

    Length: 4710 (0x1266)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Log;
with Profile;
with String_Operations;
with String_Utilities;
with Tms;
procedure Basic_Alpha_Numeric_String_Tests (Test_Range : String := "ALL") is

    package So renames String_Operations;

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

begin

    if String_Utilities.Upper_Case (Test_Range) = "ALL" then

        if So.Is_Alpha_Numeric_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_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_String ("0") then
            Log.Put_Line ("Failed single numeric test",
                          Kind => Profile.Error_Msg,
                          Response => Profile.Get);
            Result := Fail;
        end if;

        if So.Is_Alpha_Numeric_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_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_String ("96") then
            Log.Put_Line ("Failed 2 char numeric test",
                          Kind => Profile.Error_Msg,
                          Response => Profile.Get);
            Result := Fail;
        end if;

    end if;

    if So.Is_Alpha_Numeric_String ("adsaaABAE028$aaru26mAA") then
        Log.Put_Line ("Failed embedded non-alpha_numeric test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

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

    if So.Is_Alpha_Numeric_String ("02627GARYhs5gajuuu^") then
        Log.Put_Line ("Failed ending non-alpha_numeric test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_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_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_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_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_String ("sdradramg8asdrarul") then
        Log.Put_Line ("Failed embedded numeric char test",
                      Kind => Profile.Error_Msg,
                      Response => Profile.Get);
        Result := Fail;
    end if;

    if not So.Is_Alpha_Numeric_String ("aZsaD2dra6JWR9a02145NJWmGf") 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_String_Tests;