-- (C) Copyright 2000 by John Halleck, All Rights Reserved. -- Test the Braille.Display package. with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; use Ada.Command_Line; with Braille; use Braille; with Braille.Display; use Braille.Display; with Braille.Display.Print; use Braille.Display.Print; procedure Braille_Display_Print_TEST is Test_Status : Exit_Status := Success; Test : constant Braille_String := (Empty, -- The separate Dots. Dot_1, Dot_2, Dot_3, Dot_4, Dot_5, Dot_6, -- Each row in order. Dot_1 + Dot_4, Dot_2 + Dot_5, Dot_3 + Dot_6, -- Each Column in order. Dot_1 + Dot_2 + Dot_3, Dot_4 + Dot_5 + Dot_6 ); begin Put_Line ("Braille.Display.Print tests starting ..."); Put_Line (" The following line should start with a blank cell"); Put_Line (" Followed by six cells, each one with one dot per cell"); Put_Line (" Followed by each row, top to bottom"); Put_Line (" Followed by the left and right columns"); Put (Given => Test, Indent => " Got: ", Suppress_Blanks => False); Put_Line (" It should look like:"); Put_Line (" .. *. .. .. .* .. .. ** .. .. *. .*"); Put_Line (" .. .. *. .. .. .* .. .. ** .. *. .*"); Put_Line (" .. .. .. *. .. .. .* .. .. ** *. .*"); New_Line; Put (" With blank Cell suppression, it looks like:"); Put (Given => Test, Indent => " Got: ", Suppress_Blanks => True); Put_Line (" It should look like:"); Put_Line (" *. .. .. .* .. .. ** .. .. *. .*"); Put_Line (" .. *. .. .. .* .. .. ** .. *. .*"); Put_Line (" .. .. *. .. .. .* .. .. ** *. .*"); Put ("Braille.Display.Print tests complete, "); if Test_Status = Failure then Put ("****** FAILED ******"); else Put_Line ("--- (Conditionally) Passed! ---"); Put (" (But a human needs to look at the Output)"); end if; New_Line; Set_Exit_Status (Test_Status); end Braille_Display_Print_TEST;