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: 5616 (0x15f0) 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 Xlbp_U_Char_Generics; --/ if Record_Rep_Clauses then --// with Xlbmt_Parameters; --// use Xlbmt_Parameters; --/ end if; procedure Cvt_090 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; ---------------------------------------------------------------------- ------------------------- -- Major test sections -- ------------------------- procedure Test_Discrete_Conversions is procedure To_Uca is new Xlbp_U_Char_Generics.Convert_Discrete_To_Uca (Discrete_S32); procedure From_Uca is new Xlbp_U_Char_Generics.Convert_Uca_To_Discrete (Discrete_S32); procedure Test_Discrete_S32 is new Tests.Tester (Discrete_S32, "Discrete_S32", To_Uca, From_Uca); procedure To_Uca is new Xlbp_U_Char_Generics.Convert_Discrete_To_Uca (Discrete_S16); procedure From_Uca is new Xlbp_U_Char_Generics.Convert_Uca_To_Discrete (Discrete_S16); procedure Test_Discrete_S16 is new Tests.Tester (Discrete_S16, "Discrete_S16", To_Uca, From_Uca); procedure To_Uca is new Xlbp_U_Char_Generics.Convert_Discrete_To_Uca (Discrete_S8); procedure From_Uca is new Xlbp_U_Char_Generics.Convert_Uca_To_Discrete (Discrete_S8); procedure Test_Discrete_S8 is new Tests.Tester (Discrete_S8, "Discrete_S8", To_Uca, From_Uca); procedure To_Uca is new Xlbp_U_Char_Generics.Convert_Discrete_To_Uca (Discrete_U16); procedure From_Uca is new Xlbp_U_Char_Generics.Convert_Uca_To_Discrete (Discrete_U16); procedure Test_Discrete_U16 is new Tests.Tester (Discrete_U16, "Discrete_U16", To_Uca, From_Uca); procedure To_Uca is new Xlbp_U_Char_Generics.Convert_Discrete_To_Uca (Discrete_U8); procedure From_Uca is new Xlbp_U_Char_Generics.Convert_Uca_To_Discrete (Discrete_U8); procedure Test_Discrete_U8 is new Tests.Tester (Discrete_U8, "Discrete_U8", To_Uca, From_Uca); begin Test_Io.Section ("Converting discrete types"); Test_Discrete_S32 ("16#0000_0000#", 0, (1 .. 4 => 16#00#)); Test_Discrete_S32 ("16#0000_0001#", 1, Swab_00_00_00_01); Test_Discrete_S32 ("16#FFFF_FFFF#", -1, Swab_Ff_Ff_Ff_Ff); Test_Discrete_S32 ("16#8000_0000#", Discrete_S32'First, Swab_80_00_00_00); Test_Discrete_S32 ("16#7FFF_FFFF#", Discrete_S32'Last, Swab_7f_Ff_Ff_Ff); Test_Discrete_S32 ("16#0123_4567#", 16#0123_4567#, Swab_01_23_45_67); Test_Io.New_Line; Test_Discrete_S16 ("16#0000#", 0, Swab_00_00); Test_Discrete_S16 ("16#0001#", 1, Swab_00_01); Test_Discrete_S16 ("16#FFFF#", -1, Swab_Ff_Ff); Test_Discrete_S16 ("16#8000#", Discrete_S16'First, Swab_80_00); Test_Discrete_S16 ("16#7FFF#", Discrete_S16'Last, Swab_7f_Ff); Test_Discrete_S16 ("16#0123#", 16#0123#, Swab_01_23); Test_Io.New_Line; Test_Discrete_S8 ("16#00#", 0, (1 => 16#00#)); Test_Discrete_S8 ("16#01#", 1, (1 => 16#01#)); Test_Discrete_S8 ("16#FF#", -1, (1 => Uca_Ff)); Test_Discrete_S8 ("16#80#", Discrete_S8'First, (1 => Uca_80)); Test_Discrete_S8 ("16#7F#", Discrete_S8'Last, (1 => 16#7F#)); Test_Io.New_Line; Test_Discrete_U16 ("16#0000#", 0, Swab_00_00); Test_Discrete_U16 ("16#0001#", 1, Swab_00_01); Test_Discrete_U16 ("16#FFFF#", Discrete_U16'Last, Swab_Ff_Ff); Test_Discrete_U16 ("16#8000#", 16#8000#, Swab_80_00); Test_Discrete_U16 ("16#7FFF#", 16#7FFF#, Swab_7f_Ff); Test_Discrete_U16 ("16#0123#", 16#0123#, Swab_01_23); Test_Io.New_Line; Test_Discrete_U8 ("16#00#", 0, (1 => 16#00#)); Test_Discrete_U8 ("16#01#", 1, (1 => 16#01#)); Test_Discrete_U8 ("16#FF#", Discrete_U8'Last, (1 => Uca_Ff)); Test_Discrete_U8 ("16#7F#", 127, (1 => 16#7F#)); Test_Discrete_U8 ("16#80#", 128, (1 => 16#80#)); Test_Io.New_Line; end Test_Discrete_Conversions; begin Test_Discrete_Conversions; end Cvt_090;