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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce3414a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3414A.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 WHEN NEW_LINE, SKIP_LINE,
27
--     END_OF_LINE, NEW_PAGE, SKIP_PAGE, END_OF_PAGE, END_OF_FILE,
28
--     SET_COL, SET_LINE, COL, LINE, AND PAGE ARE CALLED AND THE FILE
29
--     IS NOT OPEN.
30
 
31
-- HISTORY:
32
--     BCB 10/27/88  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
WITH TEXT_IO; USE TEXT_IO;
36
 
37
PROCEDURE CE3414A IS
38
 
39
     FILE : FILE_TYPE;
40
 
41
     INCOMPLETE : EXCEPTION;
42
 
43
     X : POSITIVE_COUNT;
44
 
45
BEGIN
46
     TEST ("CE3414A", "CHECK THAT STATUS_ERROR IS RAISED WHEN " &
47
                      "NEW_LINE, SKIP_LINE, END_OF_LINE, NEW_PAGE, " &
48
                      "SKIP_PAGE, END_OF_PAGE, END_OF_FILE, SET_COL, " &
49
                      "SET_LINE, COL, LINE, AND PAGE ARE CALLED AND " &
50
                      "THE FILE IS NOT OPEN");
51
 
52
     BEGIN
53
          BEGIN
54
               CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
55
          EXCEPTION
56
               WHEN USE_ERROR =>
57
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
58
                                    "WITH OUT_FILE MODE");
59
                    RAISE INCOMPLETE;
60
               WHEN NAME_ERROR =>
61
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE " &
62
                                    "WITH OUT_FILE MODE");
63
                    RAISE INCOMPLETE;
64
               WHEN OTHERS =>
65
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE");
66
                    RAISE INCOMPLETE;
67
          END;
68
 
69
          PUT (FILE, 'A');
70
 
71
          CLOSE (FILE);
72
 
73
          BEGIN
74
               NEW_LINE (FILE);
75
               FAILED ("STATUS_ERROR WAS NOT RAISED - 1");
76
          EXCEPTION
77
               WHEN STATUS_ERROR =>
78
                    NULL;
79
               WHEN OTHERS =>
80
                    FAILED ("OTHER EXCEPTION RAISED - 1");
81
          END;
82
 
83
          BEGIN
84
               SKIP_LINE (FILE);
85
               FAILED ("STATUS_ERROR WAS NOT RAISED - 2");
86
          EXCEPTION
87
               WHEN STATUS_ERROR =>
88
                    NULL;
89
               WHEN OTHERS =>
90
                    FAILED ("OTHER EXCEPTION RAISED - 2");
91
          END;
92
 
93
          BEGIN
94
               IF NOT END_OF_LINE (FILE) THEN
95
                    NULL;
96
               END IF;
97
               FAILED ("STATUS_ERROR WAS NOT RAISED - 3");
98
          EXCEPTION
99
               WHEN STATUS_ERROR =>
100
                    NULL;
101
               WHEN OTHERS =>
102
                    FAILED ("OTHER EXCEPTION RAISED - 3");
103
          END;
104
 
105
          BEGIN
106
               NEW_PAGE (FILE);
107
               FAILED ("STATUS_ERROR WAS NOT RAISED - 4");
108
          EXCEPTION
109
               WHEN STATUS_ERROR =>
110
                    NULL;
111
               WHEN OTHERS =>
112
                    FAILED ("OTHER EXCEPTION RAISED - 4");
113
          END;
114
 
115
          BEGIN
116
               SKIP_PAGE (FILE);
117
               FAILED ("STATUS_ERROR WAS NOT RAISED - 5");
118
          EXCEPTION
119
               WHEN STATUS_ERROR =>
120
                    NULL;
121
               WHEN OTHERS =>
122
                    FAILED ("OTHER EXCEPTION RAISED - 5");
123
          END;
124
 
125
          BEGIN
126
               IF NOT END_OF_PAGE (FILE) THEN
127
                    NULL;
128
               END IF;
129
               FAILED ("STATUS_ERROR WAS NOT RAISED - 6");
130
          EXCEPTION
131
               WHEN STATUS_ERROR =>
132
                    NULL;
133
               WHEN OTHERS =>
134
                    FAILED ("OTHER EXCEPTION RAISED - 6");
135
          END;
136
 
137
          BEGIN
138
               IF NOT END_OF_FILE (FILE) THEN
139
                    NULL;
140
               END IF;
141
               FAILED ("STATUS_ERROR WAS NOT RAISED - 7");
142
          EXCEPTION
143
               WHEN STATUS_ERROR =>
144
                    NULL;
145
               WHEN OTHERS =>
146
                    FAILED ("OTHER EXCEPTION RAISED - 7");
147
          END;
148
 
149
          BEGIN
150
               SET_COL (FILE, 2);
151
               FAILED ("STATUS_ERROR WAS NOT RAISED - 8");
152
          EXCEPTION
153
               WHEN STATUS_ERROR =>
154
                    NULL;
155
               WHEN OTHERS =>
156
                    FAILED ("OTHER EXCEPTION RAISED - 8");
157
          END;
158
 
159
          BEGIN
160
               SET_LINE (FILE, 2);
161
               FAILED ("STATUS_ERROR WAS NOT RAISED - 9");
162
          EXCEPTION
163
               WHEN STATUS_ERROR =>
164
                    NULL;
165
               WHEN OTHERS =>
166
                    FAILED ("OTHER EXCEPTION RAISED - 9");
167
          END;
168
 
169
          BEGIN
170
               X := COL (FILE);
171
               FAILED ("STATUS_ERROR WAS NOT RAISED - 10");
172
          EXCEPTION
173
               WHEN STATUS_ERROR =>
174
                    NULL;
175
               WHEN OTHERS =>
176
                    FAILED ("OTHER EXCEPTION RAISED - 10");
177
          END;
178
 
179
          BEGIN
180
               X := LINE (FILE);
181
               FAILED ("STATUS_ERROR WAS NOT RAISED - 11");
182
          EXCEPTION
183
               WHEN STATUS_ERROR =>
184
                    NULL;
185
               WHEN OTHERS =>
186
                    FAILED ("OTHER EXCEPTION RAISED - 11");
187
          END;
188
 
189
          BEGIN
190
               X := PAGE (FILE);
191
               FAILED ("STATUS_ERROR WAS NOT RAISED - 12");
192
          EXCEPTION
193
               WHEN STATUS_ERROR =>
194
                    NULL;
195
               WHEN OTHERS =>
196
                    FAILED ("OTHER EXCEPTION RAISED - 12");
197
          END;
198
     EXCEPTION
199
          WHEN INCOMPLETE =>
200
               NULL;
201
     END;
202
 
203
     RESULT;
204
END CE3414A;

powered by: WebSVN 2.1.0

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