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

⟦fb0c4f1d8⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Cvt_096, seg_0054b1

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

--/ if Record_Rep_Clauses then
--// with Xlbmt_Parameters;
--// use Xlbmt_Parameters;
--/ end if;

procedure Cvt_096 is
------------------------------------------------------------------------------
-- Tests for Xlbp_U_Char_Generics
------------------------------------------------------------------------------
-- ****************************************************************************
-- * Date      - /Name/ Comment
-- *
-- * 25-SEP-90 - /DRK/ Created.
-- * 14-NOV-90 - /GEB/ Separate cvt_090 into four parts.
-- ****************************************************************************
------------------------------------------------------------------------------


    ---------------------------------
    -- Handy constants and renames --
    ---------------------------------

    package Utils renames Cvt_Test_Utilities;  
    package Tests renames Utils.U_Char_Tests;  
    use Utils.U_Char_Constants;

    ----------------------------------------------------------------------

    -----------------
    -- Local types --
    -----------------

    type Discrete_S32 is new Xlbt_Arithmetic.S_Long;  
    type Discrete_S16 is new Xlbt_Arithmetic.S_Short;  
    type Discrete_U16 is new Xlbt_Arithmetic.U_Short;  
    type Discrete_S8  is new Xlbt_Arithmetic.S_Char;  
    type Discrete_U8  is new Xlbt_Arithmetic.U_Char;


    type Array_S8_U8_Of_S8 is  
       array (Discrete_S8 range <>, Discrete_U8 range <>) of Discrete_S8;
--/ if Pack then
--//    pragma Pack (Array_S8_U8_Of_S8);
--/ end if;

    ----------------------------------------------------------------------

    -------------------------
    -- Major test sections --
    -------------------------

    procedure Test_2d_Array_Conversions is  
        procedure To_Uca is new Xlbp_U_Char_Generics.Convert_2d_Array_To_Uca  
                                   (Discrete_S8, Discrete_S8,  
                                    Discrete_U8, Array_S8_U8_Of_S8);  
        procedure From_Uca is new Xlbp_U_Char_Generics.Convert_Uca_To_2d_Array  
                                     (Discrete_S8, Discrete_S8,  
                                      Discrete_U8, Array_S8_U8_Of_S8);  
        procedure Test_Array_S8_U8_Of_S8 is  
           new Tests.Tester_2d (Discrete_S8, Discrete_S8,  
                                Discrete_U8, Array_S8_U8_Of_S8,  
                                "Array_S8_U8_Of_S8", To_Uca, From_Uca);  
    begin  
        Test_Io.Section ("Converting 2d array types");

        Test_Array_S8_U8_Of_S8 ("1..0 => (1..0 => 0)",  
                                (1 .. 0 => (1 .. 0 => 0)), (1 .. 0 => 16#00#));  
        Test_Array_S8_U8_Of_S8 ("9..-4 => (1..1 => 0)",  
                                (9 .. -4 => (1 .. 1 => 0)), (1 .. 0 => 16#00#));  
        Test_Array_S8_U8_Of_S8 ("1..1 => (9..-4 => 0)",  
                                (1 .. 1 => (9 .. -4 => 0)), (1 .. 0 => 16#00#));  
        Test_Array_S8_U8_Of_S8 ("1..1 => (1..1 => 16#01#)",  
                                (1 => (1 => 16#01#)), (1 => 16#01#));  
        Test_Array_S8_U8_Of_S8 ("0..0 => (0..0 => 16#02#)",  
                                (0 => (0 => 16#02#)), (1 => 16#02#));  
        Test_Array_S8_U8_Of_S8 ("(1, 2, 3), (4, 5, 6)",  
                                ((1, 2, 3), (4, 5, 6)), (1, 2, 3, 4, 5, 6));  
        Test_Array_S8_U8_Of_S8 ("127 => (255 => 16#FF#)",  
                                (127 => (255 => -1)), (1 => Uca_Ff));  
        Test_Array_S8_U8_Of_S8  
           ("-5..-3 => (0..1 => 16#80#)",  
            (-5 .. -3 => (0 .. 1 => -128)), (1 .. 6 => Uca_80));  
        Test_Io.New_Line;  
    end Test_2d_Array_Conversions;

begin  
    Test_2d_Array_Conversions;  
end Cvt_096;  

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=20 rec1=00 rec2=01 rec3=026
        [0x01] rec0=1e rec1=00 rec2=02 rec3=00e
        [0x02] rec0=00 rec1=00 rec2=05 rec3=004
        [0x03] rec0=10 rec1=00 rec2=03 rec3=05a
        [0x04] rec0=13 rec1=00 rec2=04 rec3=000
    tail 0x21500a16e81978a56fb3a 0x42a00088462063203