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

⟦ea96ff6ac⟧ Ada Source

    Length: 17408 (0x4400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Cvt_120, seg_0054c3

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_Basic;  
with Xlbt_Color;  
with Xlbt_Gc;  
with Xlbt_Grab;  
with Xlbt_Graphics;  
with Xlbt_Host;  
with Xlbt_Image;  
with Xlbt_Input_Focus;  
with Xlbt_Key;  
with Xlbt_Keyboard;  
with Xlbt_Misc;  
with Xlbt_Pointer;  
with Xlbt_Request;  
with Xlbt_Screen_Saver;  
with Xlbt_Window;  
with Xlbmt_Network_Types;

with Xlbip_Request_Converters;


procedure Cvt_120 is
------------------------------------------------------------------------------
-- Tests for Xlbip_Request_Converters
--
-- Xlbip_Request_Converters only instantiates the converters actually
-- used by the protocol.  The tester generics expect to have symmetric
-- converters for each type.  Individual tests instantiate their own
-- dummy To_Raw and From_Raw converters when necessary.
-- ****************************************************************************
-- * Date      - /Name/ Comment
-- *
-- * 18-SEP-90 - /DRK/ Created.
-- *  4-APR-91 - /GEB/ HPUX CDF chokes on the original unit, too big.  Break
-- *           -  it into 12-15 different units.
-- ****************************************************************************
------------------------------------------------------------------------------

--\x0c
---------------------------------
-- 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 --
-------------------------

--\x0c
    procedure Test_X_Alloc_Color_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Alloc_Color_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Alloc_Color_Request,  
                                  "X_Alloc_Color_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Alloc_Color_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Id => (Number => 0)), 0, 0, 0, 0), (1 .. 16 => 0));  
        Test ("1.-1.2.3.4.5.6.-1", (Xlbt_Request.Create_Window, 255, 2,  
                                    (Id => (Number => 3)), 4, 5, 6, 16#FFFF#),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 &  
                 Swab_00_04 & Swab_00_05 & Swab_00_06 & Swab_Ff_Ff);  
        Test_Io.New_Line;  
    end Test_X_Alloc_Color_Request;

--\x0c
    procedure Test_X_Alloc_Color_Cells_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Alloc_Color_Cells_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Alloc_Color_Cells_Request,  
                                  "X_Alloc_Color_Cells_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Alloc_Color_Cells_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Misc.False,  
                    0, (Id => (Number => 0)), 0, 0), (1 .. 12 => 0));  
        Test ("0.1.3.4.5.6", (Xlbt_Request.Invalid_Request, Xlbt_Misc.True,  
                              3, (Id => (Number => 4)), 5, 6),  
              ((0, 1)) & Swab_00_03 & Swab_00_00_00_04 &  
                 Swab_00_05 & Swab_00_06);  
        Test_Io.New_Line;  
    end Test_X_Alloc_Color_Cells_Request;

--\x0c
    procedure Test_X_Alloc_Color_Planes_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Alloc_Color_Planes_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Alloc_Color_Planes_Request,  
                                  "X_Alloc_Color_Planes_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Alloc_Color_Planes_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Misc.False,  
                    0, (Id => (Number => 0)), 0, 0, 0, 0), (1 .. 16 => 0));  
        Test ("0.1.3.4.5.6.7.8", (Xlbt_Request.Invalid_Request, Xlbt_Misc.True,  
                                  3, (Id => (Number => 4)), 5, 6, 7, 8),  
              ((0, 1)) & Swab_00_03 & Swab_00_00_00_04 &  
                 Swab_00_05 & Swab_00_06 & Swab_00_07 & Swab_00_08);  
        Test_Io.New_Line;  
    end Test_X_Alloc_Color_Planes_Request;

--\x0c
    procedure Test_X_Alloc_Named_Color_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Alloc_Named_Color_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Alloc_Named_Color_Request,  
                                  "X_Alloc_Named_Color_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Alloc_Named_Color_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Id => (Number => 0)), 0, 0, 0), (1 .. 12 => 0));  
        Test ("1.-1.2.3.4.-1", (Xlbt_Request.Create_Window, 255, 2,  
                                (Id => (Number => 3)), 4, 255, 255),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 &  
                 Swab_00_04 & Swab_Ff_Ff);  
        Test_Io.New_Line;  
    end Test_X_Alloc_Named_Color_Request;

--\x0c
    procedure Test_X_Allow_Events_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Allow_Events_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Allow_Events_Request,  
                                  "X_Allow_Events_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Allow_Events_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request,  
                    Xlbt_Grab.Async_Pointer, 0, 0), (1 .. 8 => 0));  
        Test ("1.2.3.4", (Xlbt_Request.Create_Window,  
                          Xlbt_Grab.Replay_Pointer, 3, 4),  
              ((1, 2)) & Swab_00_03 & Swab_00_00_00_04);  
        Test_Io.New_Line;  
    end Test_X_Allow_Events_Request;

--\x0c
    procedure Test_X_Bell_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Bell_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Bell_Request, "X_Bell_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Bell_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0), (1 .. 4 => 0));  
        Test ("1.2.3", (Xlbt_Request.Create_Window, 2, 3),  
              ((1, 2)) & Swab_00_03);  
        Test_Io.New_Line;  
    end Test_X_Bell_Request;

--\x0c
    procedure Test_X_Change_Active_Pointer_Grab_Request is  
        procedure From_Raw is  
           new Dummy.Convert_To_Private  
                  (Xlbt_Request.X_Change_Active_Pointer_Grab_Request,  
                   Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test     is  
           new Tests.Tester (Xlbt_Request.X_Change_Active_Pointer_Grab_Request,  
                             "X_Change_Active_Pointer_Grab_Request",  
                             Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Active_Pointer_Grab_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Id => (Number => 0)), 0, (others => False)),  
              (1 .. 16 => 0));  
        Test ("1.-1.2.3.4.5",  
              (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), 4,  
               (Xlbt_Basic.Button_Press_Mask | Xlbt_Basic.Key_Press_Mask =>  
                   True,  
                others => False)),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 &  
                 Swab_00_00_00_04 & Swab_00_00_00_05);  
        Test_Io.New_Line;  
    end Test_X_Change_Active_Pointer_Grab_Request;

--\x0c
    procedure Test_X_Change_Gc_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Change_Gc_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Change_Gc_Request,  
                                  "X_Change_Gc_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Gc_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Id => (Number => 0)), (others => False)), (1 .. 12 => 0));  
        Test ("1.-1.2.3.4", (Xlbt_Request.Create_Window,  
                             255, 2, (Id => (Number => 3)),  
                             (Xlbt_Gc.Gc_Foreground => True, others => False)),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04);  
        Test_Io.New_Line;  
    end Test_X_Change_Gc_Request;

--\x0c
    procedure Test_X_Change_Hosts_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Change_Hosts_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Change_Hosts_Request,  
                                  "X_Change_Hosts_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Hosts_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Host.Host_Insert,  
                    0, Xlbt_Host.Family_Internet, 0, 0), (1 .. 8 => 0));  
        Test ("0.1.3.1.-1.5", (Xlbt_Request.Invalid_Request,  
                               Xlbt_Host.Host_Delete, 3,  
                               Xlbt_Host.Family_Decnet, 255, 5),  
              ((0, 1)) & Swab_00_03 & ((1, Raw_Ff)) & Swab_00_05);  
        Test_Io.New_Line;  
    end Test_X_Change_Hosts_Request;

--\x0c
    procedure Test_X_Change_Keyboard_Control_Request is  
        procedure From_Raw is  
           new Dummy.Convert_To_Private  
                  (Xlbt_Request.X_Change_Keyboard_Control_Request,  
                   Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test     is  
           new Tests.Tester (Xlbt_Request.X_Change_Keyboard_Control_Request,  
                             "X_Change_Keyboard_Control_Request",  
                             Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Keyboard_Control_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (others => False)),  
              (1 .. 8 => 0));  
        Test ("1.-1.2.3", (Xlbt_Request.Create_Window, 255, 2,  
                           (Xlbt_Keyboard.Kb_Bell_Percent |  
                            Xlbt_Keyboard.Kb_Key_Click_Percent => True,  
                            others => False)),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03);  
        Test_Io.New_Line;  
    end Test_X_Change_Keyboard_Control_Request;

--\x0c
begin

    Test_X_Alloc_Color_Request;  
    Test_X_Alloc_Color_Cells_Request;  
    Test_X_Alloc_Color_Planes_Request;  
    Test_X_Alloc_Named_Color_Request;  
    Test_X_Allow_Events_Request;  
    Test_X_Bell_Request;  
    Test_X_Change_Active_Pointer_Grab_Request;  
    Test_X_Change_Gc_Request;  
    Test_X_Change_Hosts_Request;  
    Test_X_Change_Keyboard_Control_Request;

end Cvt_120;  

E3 Meta Data

    nblk1=10
    nid=0
    hdr6=20
        [0x00] rec0=23 rec1=00 rec2=01 rec3=03e
        [0x01] rec0=1c rec1=00 rec2=02 rec3=014
        [0x02] rec0=12 rec1=00 rec2=03 rec3=042
        [0x03] rec0=10 rec1=00 rec2=04 rec3=036
        [0x04] rec0=11 rec1=00 rec2=05 rec3=036
        [0x05] rec0=12 rec1=00 rec2=06 rec3=05a
        [0x06] rec0=13 rec1=00 rec2=07 rec3=05a
        [0x07] rec0=14 rec1=00 rec2=08 rec3=008
        [0x08] rec0=14 rec1=00 rec2=09 rec3=03c
        [0x09] rec0=00 rec1=00 rec2=10 rec3=008
        [0x0a] rec0=14 rec1=00 rec2=0a rec3=026
        [0x0b] rec0=12 rec1=00 rec2=0b rec3=03a
        [0x0c] rec0=13 rec1=00 rec2=0c rec3=030
        [0x0d] rec0=00 rec1=00 rec2=0f rec3=008
        [0x0e] rec0=18 rec1=00 rec2=0d rec3=02e
        [0x0f] rec0=04 rec1=00 rec2=0e rec3=000
    tail 0x21500a18681978a7ccf1f 0x42a00088462063203