DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 15223 (0x3b77) Types: TextFile Names: »B«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00 └─ ⟦0c20f784e⟧ »DATA« └─⟦1abbe589f⟧ └─⟦49e7f20b9⟧ └─⟦this⟧
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_122 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_Copy_Area_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Copy_Area_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Copy_Area_Request, "X_Copy_Area_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Copy_Area_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Id => (Number => 0)), (Id => (Number => 0)), 0, 0, 0, 0, 0, 0), (1 .. 28 => 0)); Test ("1.-1.2.3.4.5.6.7.8.9.10.11", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Id => (Number => 4)), (Id => (Number => 5)), 6, 7, 8, 9, 10, 11), ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_06 & Swab_00_07 & Swab_00_08 & Swab_00_09 & Swab_00_0a & Swab_00_0b); Test_Io.New_Line; end Test_X_Copy_Area_Request; --\f procedure Test_X_Copy_Colormap_And_Free_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Copy_Colormap_And_Free_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Copy_Colormap_And_Free_Request, "X_Copy_Colormap_And_Free_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Copy_Colormap_And_Free_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Id => (Number => 0))), (1 .. 12 => 0)); Test ("1.-1.2.3.4", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Id => (Number => 4))), ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04); Test_Io.New_Line; end Test_X_Copy_Colormap_And_Free_Request; --\f procedure Test_X_Copy_Gc_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Copy_Gc_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Copy_Gc_Request, "X_Copy_Gc_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Copy_Gc_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Id => (Number => 0)), (others => False)), (1 .. 16 => 0)); Test ("1.-1.2.3.4.5", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Id => (Number => 4)), (Xlbt_Gc.Gc_Foreground | Xlbt_Gc.Gc_Function => 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_Copy_Gc_Request; --\f procedure Test_X_Copy_Plane_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Copy_Plane_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Copy_Plane_Request, "X_Copy_Plane_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Copy_Plane_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Id => (Number => 0)), (Id => (Number => 0)), 0, 0, 0, 0, 0, 0, 0), (1 .. 32 => 0)); Test ("1.-1.2.3.4.5.6.7.8.9.10.11.12", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Id => (Number => 4)), (Id => (Number => 5)), 6, 7, 8, 9, 10, 11, 12), ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_06 & Swab_00_07 & Swab_00_08 & Swab_00_09 & Swab_00_0a & Swab_00_0b & Swab_00_00_00_0c); Test_Io.New_Line; end Test_X_Copy_Plane_Request; --\f procedure Test_X_Create_Colormap_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Create_Colormap_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Create_Colormap_Request, "X_Create_Colormap_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Create_Colormap_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Color.Alloc_None, 0, (Id => (Number => 0)), (Drawable => (Id => (Number => 0))), (Number => 0)), (1 .. 16 => 0)); Test ("0.1.3.4.5.6", (Xlbt_Request.Invalid_Request, Xlbt_Color.Alloc_All, 3, (Id => (Number => 4)), (Drawable => (Id => (Number => 5))), (Number => 6)), ((0, 1)) & Swab_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_00_00_06); Test_Io.New_Line; end Test_X_Create_Colormap_Request; --\f procedure Test_X_Create_Cursor_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Create_Cursor_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Create_Cursor_Request, "X_Create_Cursor_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Create_Cursor_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Drawable => (Id => (Number => 0))), (Drawable => (Id => (Number => 0))), 0, 0, 0, 0, 0, 0, 0, 0), (1 .. 32 => 0)); Test ("1.-1.2.3.4.5.6.7.8.9.10.11.12.13", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Drawable => (Id => (Number => 4))), (Drawable => (Id => (Number => 5))), 6, 7, 8, 9, 10, 11, 12, 13), ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_06 & Swab_00_07 & Swab_00_08 & Swab_00_09 & Swab_00_0a & Swab_00_0b & Swab_00_0c & Swab_00_0d); Test_Io.New_Line; end Test_X_Create_Cursor_Request; --\f procedure Test_X_Create_Gc_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Create_Gc_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Create_Gc_Request, "X_Create_Gc_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Create_Gc_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Number => 0), (others => False)), (1 .. 16 => 0)); Test ("1.-1.2.3.4.5", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Number => 4), (Xlbt_Gc.Gc_Foreground | Xlbt_Gc.Gc_Function => 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_Create_Gc_Request; --\f procedure Test_X_Create_Glyph_Cursor_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Create_Glyph_Cursor_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Create_Glyph_Cursor_Request, "X_Create_Glyph_Cursor_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Create_Glyph_Cursor_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Id => (Number => 0)), (Id => (Number => 0)), (Id => (Number => 0)), 0, 0, 0, 0, 0, 0, 0, 0), (1 .. 32 => 0)); Test ("1.-1.2.3.4.5.6.7.8.9.10.11.12.13", (Xlbt_Request.Create_Window, 255, 2, (Id => (Number => 3)), (Id => (Number => 4)), (Id => (Number => 5)), 6, 7, 8, 9, 10, 11, 12, 13), ((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_06 & Swab_00_07 & Swab_00_08 & Swab_00_09 & Swab_00_0a & Swab_00_0b & Swab_00_0c & Swab_00_0d); Test_Io.New_Line; end Test_X_Create_Glyph_Cursor_Request; --\f procedure Test_X_Create_Pixmap_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Create_Pixmap_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Create_Pixmap_Request, "X_Create_Pixmap_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Create_Pixmap_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Drawable => (Id => (Number => 0))), (Id => (Number => 0)), 0, 0), (1 .. 16 => 0)); Test ("1.2.3.4.5.6.7", (Xlbt_Request.Create_Window, 2, 3, (Drawable => (Id => (Number => 4))), (Id => (Number => 5)), 6, 7), ((1, 2)) & Swab_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_06 & Swab_00_07); Test_Io.New_Line; end Test_X_Create_Pixmap_Request; --\f procedure Test_X_Create_Window_Request is procedure From_Raw is new Dummy.Convert_To_Private (Xlbt_Request.X_Create_Window_Request, Xlbmt_Network_Types.X_Raw_Data_Array); procedure Test is new Tests.Tester (Xlbt_Request.X_Create_Window_Request, "X_Create_Window_Request", Xlbip_Request_Converters.To_Raw, From_Raw); begin Test_Io.Section ("X_Create_Window_Request conversions"); Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, (Drawable => (Id => (Number => 0))), (Drawable => (Id => (Number => 0))), 0, 0, 0, 0, 0, Xlbt_Window.Copy_From_Parent, (Number => 0), (others => False)), (1 .. 32 => 0)); Test ("1.2.3.4.5.6.7.8.9.10.1.12.13", (Xlbt_Request.Create_Window, 2, 3, (Drawable => (Id => (Number => 4))), (Drawable => (Id => (Number => 5))), 6, 7, 8, 9, 10, Xlbt_Window.Input_Output, (Number => 12), (Xlbt_Window.Cw_Border_Pixel | Xlbt_Window.Cw_Border_Pixmap | Xlbt_Window.Cw_Background_Pixmap => True, others => False)), ((1, 2)) & Swab_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05 & Swab_00_06 & Swab_00_07 & Swab_00_08 & Swab_00_09 & Swab_00_0a & Swab_00_01 & Swab_00_00_00_0c & Swab_00_00_00_0d); Test_Io.New_Line; end Test_X_Create_Window_Request; --\f begin Test_X_Copy_Area_Request; Test_X_Copy_Colormap_And_Free_Request; Test_X_Copy_Gc_Request; Test_X_Copy_Plane_Request; Test_X_Create_Colormap_Request; Test_X_Create_Cursor_Request; Test_X_Create_Gc_Request; Test_X_Create_Glyph_Cursor_Request; Test_X_Create_Pixmap_Request; Test_X_Create_Window_Request; end Cvt_122;