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

⟦eb5d4a4ff⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Contrat, seg_0541c2, seg_0550bc

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 Sub_Contrat;
with Message;
with Text_Io;
--with List_Generic;
with Bounded_String;

procedure Test_Contrat is
    L : Sub_Contrat.Contrat_List.List;
    M1, M2 : Message.Tmessage;
    Tmp, Tmp2 : Message.Content_String;
    Cont, Cont2 : Sub_Contrat.Tcontrat;
begin
    Bounded_String.Copy (Tmp, "Maths");
    Message.Fill_Command (M1, Message.Publication);
    Message.Fill_Content (M1, Tmp);
    Message.Fill_Origin (M1, 7);

    Bounded_String.Copy (Tmp2, "Heure");
    Message.Fill_Command (M2, Message.Registration);
    Message.Fill_Content (M2, Tmp2);
    Message.Fill_Origin (M2, 10);



    Text_Io.Put_Line ("TEST Is_Publication :");

    if Sub_Contrat.Is_Publication (M1) then
        Text_Io.Put_Line ("publication");
    else
        Text_Io.Put_Line ("pas bon...");
    end if;

    Text_Io.Put_Line ("TEST Is_Unpublication :");

    Message.Fill_Command (M1, Message.Unpublication);

    if Sub_Contrat.Is_Unpublication (M1) then
        Text_Io.Put_Line ("UNpublication");
    else
        Text_Io.Put_Line ("pas bon...");
    end if;

    Text_Io.Put_Line ("TEST des contrats :");  
    Text_Io.Put_Line (Natural'Image (Sub_Contrat.Contrat_List.Length (L)));

    Sub_Contrat.Fill_Contrat (M1, Cont);
    Sub_Contrat.Add_Contrat (L, Cont);
    Text_Io.Put_Line (Natural'Image (Sub_Contrat.Contrat_List.Length (L)));
    Sub_Contrat.Fill_Contrat (M2, Cont2);
    Sub_Contrat.Add_Contrat (L, Cont2);
    Text_Io.Put_Line (Natural'Image (Sub_Contrat.Contrat_List.Length (L)));

    if Sub_Contrat.Contrat_Exists (L, Tmp) then
        Text_Io.Put_Line ("On retrouve le contrat 1");
    else
        Text_Io.Put_Line ("pas bon...");
    end if;
    Text_Io.Put_Line (Natural'Image (Sub_Contrat.Contrat_List.Length (L)));

    if Sub_Contrat.Contrat_Exists (L, Tmp2) then
        Text_Io.Put_Line ("On retrouve le contrat 2");
    else
        Text_Io.Put_Line ("pas bon...");
    end if;  
    Text_Io.Put_Line (Natural'Image (Sub_Contrat.Contrat_List.Length (L)));

    Text_Io.Put_Line ("Id du contrat 1 :");

    Text_Io.Put_Line (Message.Tclient_Id'Image
                         (Sub_Contrat.Contrat_Provider (L, Tmp)));

    Text_Io.Put_Line ("Id du contrat 2 :");

    Text_Io.Put_Line (Message.Tclient_Id'Image
                         (Sub_Contrat.Contrat_Provider (L, Tmp2)));

    Sub_Contrat.Remove_Contrat (L, Tmp2);
    Text_Io.Put_Line (Natural'Image (Sub_Contrat.Contrat_List.Length (L)));

    if Sub_Contrat.Contrat_Exists (L, Tmp2) then
        Text_Io.Put_Line ("On retrouve le contrat 2 : c'est pas bon");
    else
        Text_Io.Put_Line ("Contrat 2 supprime...");
    end if;  
    if Sub_Contrat.Contrat_Exists (L, Tmp) then
        Text_Io.Put_Line ("On retrouve le contrat 1 ");
    else
        Text_Io.Put_Line ("Pas bon");
    end if;

end Test_Contrat;

E3 Meta Data

    nblk1=4
    nid=4
    hdr6=6
        [0x00] rec0=26 rec1=00 rec2=01 rec3=04a
        [0x01] rec0=1b rec1=00 rec2=03 rec3=016
        [0x02] rec0=1d rec1=00 rec2=02 rec3=000
        [0x03] rec0=05 rec1=c7 rec2=94 rec3=142
    tail 0x2175cdd2287b55fa4e1a3 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 00 04 80 01 28 01 00 00 00 00 00 00 00 00  ┆      (         ┆