|
|
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 - metrics - downloadIndex: B T
Length: 12146 (0x2f72)
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_130 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_Set_Close_Down_Mode_Request is
procedure From_Raw is
new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Close_Down_Mode_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Close_Down_Mode_Request,
"X_Set_Close_Down_Mode_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Close_Down_Mode_Request conversions");
Test ("0", (Xlbt_Request.Invalid_Request, Xlbt_Host.Destroy_All, 0),
(1 .. 4 => 0));
Test ("1.2.3", (Xlbt_Request.Create_Window,
Xlbt_Host.Retain_Temporary, 3), ((1, 2)) & Swab_00_03);
Test_Io.New_Line;
end Test_X_Set_Close_Down_Mode_Request;
--\f
procedure Test_X_Set_Dashes_Request is
procedure From_Raw is new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Dashes_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Dashes_Request,
"X_Set_Dashes_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Dashes_Request conversions");
Test ("0", (Xlbt_Request.Invalid_Request, 0,
0, (Id => (Number => 0)), 0, 0), (1 .. 12 => 0));
Test ("1.-1.2.3.4.5", (Xlbt_Request.Create_Window, 255,
2, (Id => (Number => 3)), 4, 5),
((1, Raw_Ff)) & Swab_00_02 & Swab_00_00_00_03 &
Swab_00_04 & Swab_00_05);
Test_Io.New_Line;
end Test_X_Set_Dashes_Request;
--\f
procedure Test_X_Set_Font_Path_Request is
procedure From_Raw is new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Font_Path_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Font_Path_Request,
"X_Set_Font_Path_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Font_Path_Request conversions");
Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, 0, 0, 0),
(1 .. 8 => 0));
Test ("1.-1.2.3.-1", (Xlbt_Request.Create_Window, 255, 2, 3, 255, 255),
((1, Raw_Ff)) & Swab_00_02 & Swab_00_03 & Swab_Ff_Ff);
Test_Io.New_Line;
end Test_X_Set_Font_Path_Request;
--\f
procedure Test_X_Set_Input_Focus_Request is
procedure From_Raw is new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Input_Focus_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Input_Focus_Request,
"X_Set_Input_Focus_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Input_Focus_Request conversions");
Test ("0", (Xlbt_Request.Invalid_Request,
Xlbt_Input_Focus.Revert_To_None, 0,
(Drawable => (Id => (Number => 0))), 0), (1 .. 12 => 0));
Test ("1.2.3.4.5", (Xlbt_Request.Create_Window,
Xlbt_Input_Focus.Revert_To_Parent, 3,
(Drawable => (Id => (Number => 4))), 5),
((1, 2)) & Swab_00_03 & Swab_00_00_00_04 & Swab_00_00_00_05);
Test_Io.New_Line;
end Test_X_Set_Input_Focus_Request;
--\f
procedure Test_X_Set_Modifier_Mapping_Request is
procedure From_Raw is
new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Modifier_Mapping_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Modifier_Mapping_Request,
"X_Set_Modifier_Mapping_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Modifier_Mapping_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_Set_Modifier_Mapping_Request;
--\f
procedure Test_X_Set_Pointer_Mapping_Request is
procedure From_Raw is
new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Pointer_Mapping_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Pointer_Mapping_Request,
"X_Set_Pointer_Mapping_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Pointer_Mapping_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_Set_Pointer_Mapping_Request;
--\f
procedure Test_X_Set_Screen_Saver_Request is
procedure From_Raw is new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Screen_Saver_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Screen_Saver_Request,
"X_Set_Screen_Saver_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Screen_Saver_Request conversions");
Test ("0", (Xlbt_Request.Invalid_Request, 0, 0, 0, 0,
Xlbt_Screen_Saver.Dont_Prefer_Blanking,
Xlbt_Screen_Saver.Dont_Allow_Exposures, 0), (1 .. 12 => 0));
Test ("1.-1.2.3.4.1.2.-1",
(Xlbt_Request.Create_Window, 255, 2, 3,
4, Xlbt_Screen_Saver.Prefer_Blanking,
Xlbt_Screen_Saver.Default_Exposures, 16#FFFF#),
((1, Raw_Ff)) & Swab_00_02 & Swab_00_03 &
Swab_00_04 & ((1, 2)) & Swab_Ff_Ff);
Test_Io.New_Line;
end Test_X_Set_Screen_Saver_Request;
--\f
procedure Test_X_Set_Selection_Owner_Request is
procedure From_Raw is
new Dummy.Convert_To_Private
(Xlbt_Request.X_Set_Selection_Owner_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Set_Selection_Owner_Request,
"X_Set_Selection_Owner_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Set_Selection_Owner_Request conversions");
Test ("0", (Xlbt_Request.Invalid_Request, 0, 0,
(Drawable => (Id => (Number => 0))), (Number => 0), 0),
(1 .. 16 => 0));
Test ("1.-1.2.3.4.5",
(Xlbt_Request.Create_Window, 255, 2,
(Drawable => (Id => (Number => 3))), (Number => 4), 5),
((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_Set_Selection_Owner_Request;
--\f
procedure Test_X_Store_Colors_Request is
procedure From_Raw is new Dummy.Convert_To_Private
(Xlbt_Request.X_Store_Colors_Request,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Store_Colors_Request,
"X_Store_Colors_Request",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Store_Colors_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_Store_Colors_Request;
--\f
procedure Test_X_Color_Item is
procedure From_Raw is new Dummy.Convert_To_Private
(Xlbt_Request.X_Color_Item,
Xlbmt_Network_Types.X_Raw_Data_Array);
procedure Test is new Tests.Tester
(Xlbt_Request.X_Color_Item, "X_Color_Item",
Xlbip_Request_Converters.To_Raw, From_Raw);
begin
Test_Io.Section ("X_Color_Item conversions");
Test ("0", (0, 0, 0, 0, (others => False), 0), (1 .. 12 => 0));
Test ("1.2.3.4.5.-1",
(1, 2, 3, 4, (Xlbt_Color.Do_Blue | Xlbt_Color.Do_Red => True,
others => False), 255),
Swab_00_00_00_01 & Swab_00_02 & Swab_00_03 &
Swab_00_04 & ((5, Raw_Ff)));
Test_Io.New_Line;
end Test_X_Color_Item;
--\f
begin
Test_X_Set_Close_Down_Mode_Request;
Test_X_Set_Dashes_Request;
Test_X_Set_Font_Path_Request;
Test_X_Set_Input_Focus_Request;
Test_X_Set_Modifier_Mapping_Request;
Test_X_Set_Pointer_Mapping_Request;
Test_X_Set_Screen_Saver_Request;
Test_X_Set_Selection_Owner_Request;
Test_X_Store_Colors_Request;
Test_X_Color_Item;
end Cvt_130;