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

⟦88989a5b0⟧ TextFile

    Length: 6988 (0x1b4c)
    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_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;