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

⟦3ad47f4d7⟧ TextFile

    Length: 13480 (0x34a8)
    Types: TextFile
    Names: »B«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦49e7f20b9⟧ 
                └─⟦this⟧ 

TextFile

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_121 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.
-- ****************************************************************************
------------------------------------------------------------------------------

--\f


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

--\f

    procedure Test_X_Change_Keyboard_Mapping_Request is  
        procedure From_Raw is  
           new Dummy.Convert_To_Private  
                  (Xlbt_Request.X_Change_Keyboard_Mapping_Request,  
                   Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test     is  
           new Tests.Tester (Xlbt_Request.X_Change_Keyboard_Mapping_Request,  
                             "X_Change_Keyboard_Mapping_Request",  
                             Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Keyboard_Mapping_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, 0, 0, 0),  
              (1 .. 8 => 0));  
        Test ("1.2.3.4.5.-1", (Xlbt_Request.Create_Window,  
                               2, 3, 4, 5, 16#FFFF#),  
              ((1, 2)) & Swab_00_03 & ((4, 5)) & Swab_Ff_Ff);  
        Test_Io.New_Line;  
    end Test_X_Change_Keyboard_Mapping_Request;

--\f

    procedure Test_X_Change_Pointer_Control_Request is  
        procedure From_Raw is  
           new Dummy.Convert_To_Private  
                  (Xlbt_Request.X_Change_Pointer_Control_Request,  
                   Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Change_Pointer_Control_Request,  
                                  "X_Change_Pointer_Control_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Pointer_Control_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, 0,  
                    0, 0, Xlbt_Misc.False, Xlbt_Misc.False), (1 .. 12 => 0));  
        Test ("1.-1.2.3.4.5.0.1", (Xlbt_Request.Create_Window, 255, 2, 3,  
                                   4, 5, Xlbt_Misc.False, Xlbt_Misc.True),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_03 &  
                 Swab_00_04 & Swab_00_05 & ((0, 1)));  
        Test_Io.New_Line;  
    end Test_X_Change_Pointer_Control_Request;

--\f

    procedure Test_X_Change_Property_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Change_Property_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Change_Property_Request,  
                                  "X_Change_Property_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Property_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Window.Prop_Mode_Replace,  
                    0, (Drawable => (Id => (Number => 0))),  
                    (Number => 0), (Number => 0), 0, 0, 0, 0, 0),  
              (1 .. 24 => 0));  
        Test ("1.2.3.4.5.6.7.-1.8",  
              (Xlbt_Request.Create_Window, Xlbt_Window.Prop_Mode_Append,  
               3, (Drawable => (Id => (Number => 4))),  
               (Number => 5), (Number => 6), 7, 255, 255, 255, 8),  
              ((1, 2)) & Swab_00_03 & Swab_00_00_00_04 &  
                 Swab_00_00_00_05 & Swab_00_00_00_06 &  
                 (1 => 7, 2 .. 4 => Raw_Ff) & Swab_00_00_00_08);  
        Test_Io.New_Line;  
    end Test_X_Change_Property_Request;

--\f

    procedure Test_X_Change_Save_Set_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Change_Save_Set_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Change_Save_Set_Request,  
                                  "X_Change_Save_Set_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Save_Set_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Host.Set_Mode_Insert,  
                    0, (Drawable => (Id => (Number => 0)))), (1 .. 8 => 0));  
        Test ("0.1.3.4", (Xlbt_Request.Invalid_Request,  
                          Xlbt_Host.Set_Mode_Delete, 3,  
                          (Drawable => (Id => (Number => 4)))),  
              ((0, 1)) & Swab_00_03 & Swab_00_00_00_04);  
        Test_Io.New_Line;  
    end Test_X_Change_Save_Set_Request;

--\f

    procedure Test_X_Change_Window_Attributes_Request is  
        procedure From_Raw is  
           new Dummy.Convert_To_Private  
                  (Xlbt_Request.X_Change_Window_Attributes_Request,  
                   Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test     is  
           new Tests.Tester (Xlbt_Request.X_Change_Window_Attributes_Request,  
                             "X_Change_Window_Attributes_Request",  
                             Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Change_Window_Attributes_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Drawable => (Id => (Number => 0))), (others => False)),  
              (1 .. 12 => 0));  
        Test ("1.-1.2.3.4",  
              (Xlbt_Request.Create_Window, 255, 2,  
               (Drawable => (Id => (Number => 3))),  
               (Xlbt_Window.Cw_Border_Pixmap => 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_Window_Attributes_Request;

--\f

    procedure Test_X_Circulate_Window_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Circulate_Window_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Circulate_Window_Request,  
                                  "X_Circulate_Window_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Circulate_Window_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Window.Place_On_Top,  
                    0, (Drawable => (Id => (Number => 0)))), (1 .. 8 => 0));  
        Test ("0.1.3.4", (Xlbt_Request.Invalid_Request,  
                          Xlbt_Window.Place_On_Bottom, 3,  
                          (Drawable => (Id => (Number => 4)))),  
              ((0, 1)) & Swab_00_03 & Swab_00_00_00_04);  
        Test_Io.New_Line;  
    end Test_X_Circulate_Window_Request;

--\f

    procedure Test_X_Clear_Area_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Clear_Area_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Clear_Area_Request,  
                                  "X_Clear_Area_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Clear_Area_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Misc.False, 0,  
                    (Drawable => (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,  
               (Drawable => (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_Clear_Area_Request;

--\f

    procedure Test_X_Close_Font_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Close_Font_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Close_Font_Request,  
                                  "X_Close_Font_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Close_Font_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0))),  
              (1 .. 8 => 0));  
        Test ("1.-1.2.3", (Xlbt_Request.Create_Window,  
                           255, 2, (Id => (Number => 3))),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03);  
        Test_Io.New_Line;  
    end Test_X_Close_Font_Request;

--\f

    procedure Test_X_Configure_Window_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Configure_Window_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Configure_Window_Request,  
                                  "X_Configure_Window_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Configure_Window_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Drawable => (Id => (Number => 0))), (others => False), 0),  
              (1 .. 12 => 0));  
        Test ("1.-1.2.3.4.-1",  
              (Xlbt_Request.Create_Window, 255, 2,  
               (Drawable => (Id => (Number => 3))),  
               (Xlbt_Window.Cw_Width => True, others => False), 16#FFFF#),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 &  
                 Swab_00_04 & Swab_Ff_Ff);  
        Test_Io.New_Line;  
    end Test_X_Configure_Window_Request;

--\f

    procedure Test_X_Convert_Selection_Request is  
        procedure From_Raw is new Dummy.Convert_To_Private  
                                     (Xlbt_Request.X_Convert_Selection_Request,  
                                      Xlbmt_Network_Types.X_Raw_Data_Array);  
        procedure Test is new Tests.Tester  
                                 (Xlbt_Request.X_Convert_Selection_Request,  
                                  "X_Convert_Selection_Request",  
                                  Xlbip_Request_Converters.To_Raw, From_Raw);  
    begin  
        Test_Io.Section ("X_Convert_Selection_Request conversions");  
        Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,  
                    (Drawable => (Id => (Number => 0))),  
                    (Number => 0), (Number => 0), (Number => 0), 0),  
              (1 .. 24 => 0));  
        Test ("1.-1.2.3.4.5.6.7",  
              (Xlbt_Request.Create_Window, 255, 2,  
               (Drawable => (Id => (Number => 3))),  
               (Number => 4), (Number => 5), (Number => 6), 7),  
              ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04 &  
                 Swab_00_00_00_05 & Swab_00_00_00_06 & Swab_00_00_00_07);  
        Test_Io.New_Line;  
    end Test_X_Convert_Selection_Request;

--\f

begin

    Test_X_Change_Keyboard_Mapping_Request;  
    Test_X_Change_Pointer_Control_Request;  
    Test_X_Change_Property_Request;  
    Test_X_Change_Save_Set_Request;  
    Test_X_Change_Window_Attributes_Request;  
    Test_X_Circulate_Window_Request;  
    Test_X_Clear_Area_Request;  
    Test_X_Close_Font_Request;  
    Test_X_Configure_Window_Request;  
    Test_X_Convert_Selection_Request;

end Cvt_121;