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

⟦da448e2cc⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Cvt_030, seg_005487

Derivation

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

E3 Source Code



with Test_Io;  
with Cvt_Test_Utilities;

with Xlbt_Arithmetic;  
with Xlbt_Error;  
with Xlbt_Event;  
with Xlbt_Event3;  
with Xlbt_Request;  
with Xlbt_Request3;  
with Xlbmt_Network_Types;

with Xlbip_Error_Converters;


procedure Cvt_030 is
------------------------------------------------------------------------------
-- Tests for Xlbip_Error_Converters
------------------------------------------------------------------------------
-- 09/11/90 DRK     | Created.
------------------------------------------------------------------------------


    ---------------------------------
    -- Handy constants and renames --
    ---------------------------------

    package Utils renames Cvt_Test_Utilities;  
    package Tests renames Utils.Raw_Data_Tests;  
    package Dummy renames Utils.Dummy_Converters;  
    use Utils.Raw_Data_Constants;

    ----------------------------------------------------------------------

    -------------------------
    -- Major test sections --
    -------------------------

    procedure Test_X_Error_With_Atom is  
        procedure To_Raw is new Dummy.Convert_From_Private  
                                   (Xlbt_Error.X_Error_With_Atom,  
                                    Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test   is new Tests.Tester (Xlbt_Error.X_Error_With_Atom,  
                                              "X_Error_With_Atom", To_Raw,  
                                              Xlbip_Error_Converters.From_Raw);  
    begin  
        Test_Io.Section ("X_Error_With_Atom conversions");  
        Test ("0", (Xlbt_Event.Error_Event,  
                    Xlbt_Error.Success, 0, (Number => 0), 0,  
                    Xlbt_Request.Invalid_Request, (others => 0)),  
              (1 .. 32 => 0));  
        Test ("-1", (Xlbt_Event3.Xv255, Xlbt_Error.Last_Extension_Error,  
                     16#FFFF#, (Number => Minus_1), 16#FFFF#,                      Xlbt_Request3.Xr255, (others => 255)),  
              (1 .. 32 => Raw_Ff));  
        Test ("1.2.3.4.5.6.-1", (Xlbt_Event.Reply_Event,  
                                 Xlbt_Error.Bad_Value, 3, (Number => 4), 5,  
                                 Xlbt_Request.Change_Save_Set, (others => 255)),  
              ((1, 2)) & Swab_00_03 & Swab_00_00_00_04 &  
                 Swab_00_05 & (1 => 6, 2 .. 22 => Raw_Ff));  
        Test_Io.New_Line;  
    end Test_X_Error_With_Atom;

    --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --

    procedure Test_X_Error_With_Nothing is  
        procedure To_Raw is new Dummy.Convert_From_Private  
                                   (Xlbt_Error.X_Error_With_Nothing,  
                                    Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test   is new Tests.Tester (Xlbt_Error.X_Error_With_Nothing,  
                                              "X_Error_With_Nothing", To_Raw,  
                                              Xlbip_Error_Converters.From_Raw);  
    begin  
        Test_Io.Section ("X_Error_With_Nothing conversions");  
        Test ("0", (Xlbt_Event.Error_Event,  
                    Xlbt_Error.Success, 0, (others => 0), 0,  
                    Xlbt_Request.Invalid_Request, (others => 0)),  
              (1 .. 32 => 0));  
        Test ("-1", (Xlbt_Event3.Xv255, Xlbt_Error.Last_Extension_Error,  
                     16#FFFF#, (others => 255), 16#FFFF#,  
                     Xlbt_Request3.Xr255, (others => 255)),  
              (1 .. 32 => Raw_Ff));  
        Test ("1.2.3.-1.4.5.-1",  
              (Xlbt_Event.Reply_Event, Xlbt_Error.Bad_Value, 3, (others => 255),  
               4, Xlbt_Request.Destroy_Subwindows, (others => 255)),  
              ((1, 2)) & Swab_00_03 & Swab_Ff_Ff_Ff_Ff &  
                 Swab_00_04 & (1 => 5, 2 .. 22 => Raw_Ff));  
        Test_Io.New_Line;  
    end Test_X_Error_With_Nothing;
    --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --

    procedure Test_X_Error_With_Resource is  
        procedure To_Raw is new Dummy.Convert_From_Private  
                                   (Xlbt_Error.X_Error_With_Resource,  
                                    Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test   is new Tests.Tester (Xlbt_Error.X_Error_With_Resource,  
                                              "X_Error_With_Resource", To_Raw,  
                                              Xlbip_Error_Converters.From_Raw);  
    begin  
        Test_Io.Section ("X_Error_With_Resource conversions");  
        Test ("0", (Xlbt_Event.Error_Event,  
                    Xlbt_Error.Success, 0, (Number => 0), 0,  
                    Xlbt_Request.Invalid_Request, (others => 0)),  
              (1 .. 32 => 0));  
        Test ("-1", (Xlbt_Event3.Xv255, Xlbt_Error.Last_Extension_Error,  
                     16#FFFF#, (Number => Minus_1), 16#FFFF#,  
                     Xlbt_Request3.Xr255, (others => 255)),  
              (1 .. 32 => Raw_Ff));  
        Test ("1.2.3.4.5.6.-1", (Xlbt_Event.Reply_Event,  
                                 Xlbt_Error.Bad_Value, 3, (Number => 4), 5,  
                                 Xlbt_Request.Change_Save_Set, (others => 255)),  
              ((1, 2)) & Swab_00_03 & Swab_00_00_00_04 &  
                 Swab_00_05 & (1 => 6, 2 .. 22 => Raw_Ff));  
        Test_Io.New_Line;  
    end Test_X_Error_With_Resource;

    --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --

    procedure Test_X_Error_With_Value is  
        procedure To_Raw is new Dummy.Convert_From_Private  
                                   (Xlbt_Error.X_Error_With_Value,  
                                    Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test   is new Tests.Tester (Xlbt_Error.X_Error_With_Value,  
                                              "X_Error_With_Value", To_Raw,  
                                              Xlbip_Error_Converters.From_Raw);  
    begin  
        Test_Io.Section ("X_Error_With_Value conversions");  
        Test ("0", (Xlbt_Event.Error_Event, Xlbt_Error.Success, 0, 0,  
                    0, Xlbt_Request.Invalid_Request, (others => 0)),  
              (1 .. 32 => 0));  
        Test ("-1", (Xlbt_Event3.Xv255, Xlbt_Error.Last_Extension_Error,  
                     16#FFFF#, Minus_1, 16#FFFF#,  
                     Xlbt_Request3.Xr255, (others => 255)),  
              (1 .. 32 => Raw_Ff));  
        Test ("1.2.3.4.5.6.-1", (Xlbt_Event.Reply_Event,  
                                 Xlbt_Error.Bad_Value, 3, 4, 5,  
                                 Xlbt_Request.Change_Save_Set, (others => 255)),  
              ((1, 2)) & Swab_00_03 & Swab_00_00_00_04 &  
                 Swab_00_05 & (1 => 6, 2 .. 22 => Raw_Ff));  
        Test_Io.New_Line;  
    end Test_X_Error_With_Value;

begin  
    Test_X_Error_With_Atom;  
    Test_X_Error_With_Nothing;  
    Test_X_Error_With_Resource;  
    Test_X_Error_With_Value;  
end Cvt_030;  

E3 Meta Data

    nblk1=b
    nid=0
    hdr6=16
        [0x00] rec0=23 rec1=00 rec2=01 rec3=028
        [0x01] rec0=13 rec1=00 rec2=02 rec3=002
        [0x02] rec0=00 rec1=00 rec2=0b rec3=00c
        [0x03] rec0=11 rec1=00 rec2=03 rec3=09a
        [0x04] rec0=13 rec1=00 rec2=0a rec3=000
        [0x05] rec0=01 rec1=00 rec2=04 rec3=008
        [0x06] rec0=10 rec1=00 rec2=05 rec3=064
        [0x07] rec0=00 rec1=00 rec2=08 rec3=00c
        [0x08] rec0=12 rec1=00 rec2=06 rec3=07c
        [0x09] rec0=14 rec1=00 rec2=09 rec3=006
        [0x0a] rec0=05 rec1=00 rec2=07 rec3=001
    tail 0x21500a13681978a015d09 0x42a00088462063203