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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce3102d.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3102D.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- OBJECTIVE:
26
--     CHECK THAT STATUS_ERROR IS RAISED BY CLOSE, DELETE, RESET, MODE,
27
--     NAME, AND FORM IF THE GIVEN TEXT FILES ARE NOT OPEN.
28
 
29
-- HISTORY:
30
--     JLH 08/10/87  CREATED ORIGINAL TEST.
31
 
32
WITH REPORT;
33
USE REPORT;
34
WITH TEXT_IO;
35
USE TEXT_IO;
36
 
37
PROCEDURE CE3102D IS
38
 
39
     INCOMPLETE : EXCEPTION;
40
     FILE : FILE_TYPE;
41
     FT : FILE_TYPE;
42
 
43
BEGIN
44
 
45
     TEST ("CE3102D" , "CHECK THAT STATUS_ERROR IS RAISED " &
46
                       "APPROPRIATELY FOR TEXT FILES");
47
 
48
     BEGIN
49
          CREATE (FT);
50
          CLOSE (FT);
51
     EXCEPTION
52
          WHEN USE_ERROR =>
53
               NULL;
54
          WHEN OTHERS =>
55
               FAILED ("OTHER EXCEPTION RAISED FOR CREATE");
56
     END;
57
 
58
     BEGIN
59
          RESET (FT);
60
          FAILED ("STATUS_ERROR NOT RAISED FOR RESET");
61
     EXCEPTION
62
          WHEN STATUS_ERROR =>
63
               NULL;
64
          WHEN USE_ERROR =>
65
               FAILED ("USE_ERROR RAISED FOR RESET OF CLOSED FILE");
66
          WHEN OTHERS =>
67
               FAILED ("OTHER EXCEPTION RAISED FOR RESET");
68
     END;
69
 
70
     BEGIN
71
          DECLARE
72
               MD : FILE_MODE := MODE (FT);
73
          BEGIN
74
               FAILED ("STATUS_ERROR NOT RAISED FOR MODE");
75
          END;
76
     EXCEPTION
77
          WHEN STATUS_ERROR =>
78
               NULL;
79
          WHEN USE_ERROR =>
80
               FAILED ("USE_ERROR RAISED FOR MODE OF CLOSED FILE");
81
          WHEN OTHERS =>
82
               FAILED ("OTHER EXCEPTION RAISED FOR MODE");
83
     END;
84
 
85
     BEGIN
86
          DECLARE
87
               NM : CONSTANT STRING := NAME (FT);
88
          BEGIN
89
               FAILED ("STATUS_ERROR NOT RAISED FOR NAME");
90
          END;
91
     EXCEPTION
92
          WHEN STATUS_ERROR =>
93
               NULL;
94
          WHEN USE_ERROR =>
95
               FAILED ("USE_ERROR RAISED FOR NAME OF CLOSED FILE");
96
          WHEN OTHERS =>
97
               FAILED ("OTHER EXCEPTION RAISED FOR NAME");
98
     END;
99
 
100
     BEGIN
101
          DECLARE
102
               FM : CONSTANT STRING := FORM (FT);
103
          BEGIN
104
               FAILED ("STATUS_ERROR NOT RAISED FOR FORM");
105
          END;
106
     EXCEPTION
107
          WHEN STATUS_ERROR =>
108
               NULL;
109
          WHEN USE_ERROR =>
110
               FAILED ("USE_ERROR RAISED FOR FORM OF CLOSED FILE");
111
          WHEN OTHERS =>
112
               FAILED ("OTHER EXCEPTION RAISED FOR FORM");
113
     END;
114
 
115
     BEGIN
116
          CLOSE (FT);
117
          FAILED ("STATUS_ERROR NOT RAISED FOR CLOSE");
118
     EXCEPTION
119
          WHEN STATUS_ERROR =>
120
               NULL;
121
          WHEN USE_ERROR =>
122
               FAILED ("USE_ERROR RAISED WHEN CLOSING CLOSED FILE");
123
          WHEN OTHERS =>
124
               FAILED ("OTHER EXCEPTION RAISED FOR CLOSE");
125
     END;
126
 
127
     BEGIN
128
          DELETE (FT);
129
          FAILED ("STATUS_ERROR NOT RAISED FOR DELETE");
130
     EXCEPTION
131
          WHEN STATUS_ERROR =>
132
               NULL;
133
          WHEN USE_ERROR =>
134
               FAILED ("USE_ERROR RAISED FOR DELETE OF CLOSED FILE");
135
          WHEN OTHERS =>
136
               FAILED ("OTHER EXCEPTION RAISED FOR DELETE");
137
     END;
138
 
139
     RESULT;
140
 
141
EXCEPTION
142
     WHEN INCOMPLETE =>
143
          RESULT;
144
 
145
END CE3102D;

powered by: WebSVN 2.1.0

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