OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [test_enum_io.adb] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
--  { dg-do run }
2
 
3
with Ada.Text_IO;
4
use  Ada.Text_IO;
5
 
6
procedure Test_Enum_IO is
7
 
8
  type Enum is (Literal);
9
  package Enum_IO is new Enumeration_IO (Enum);
10
  use Enum_IO;
11
 
12
  File : File_Type;
13
  Value: Enum;
14
  Rest : String (1 ..30);
15
  Last : Natural;
16
 
17
begin
18
 
19
  Create (File, Mode => Out_File);
20
  Put_Line (File, "Literax0000000l note the 'l' at the end");
21
 
22
  Reset (File, Mode => In_File);
23
  Get (File, Value);
24
  Get_Line (File, Rest, Last);
25
 
26
  Close (File);
27
 
28
  Put_Line (Enum'Image (Value) & Rest (1 .. Last));
29
  raise Program_Error;
30
 
31
exception
32
  when Data_Error => null;
33
end Test_Enum_IO;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.