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/] [ce3102a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3102A.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 CREATE AND OPEN
27
--     IF THE GIVEN TEXT FILES ARE ALREADY OPEN.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     CREATE WITH MODE OUT_FILE FOR TEXT FILES.
32
 
33
-- HISTORY:
34
--     ABW 08/24/82
35
--     SPS 09/16/82
36
--     SPS 11/09/82
37
--     JBG 07/25/83
38
--     JLH 08/07/87  COMPLETE REVISION OF TEST.
39
 
40
WITH REPORT;
41
USE REPORT;
42
WITH TEXT_IO;
43
USE TEXT_IO;
44
 
45
PROCEDURE CE3102A IS
46
 
47
     INCOMPLETE : EXCEPTION;
48
     FILE : FILE_TYPE;
49
 
50
BEGIN
51
 
52
     TEST ("CE3102A" , "CHECK THAT STATUS_ERROR IS RAISED " &
53
                       "APPROPRIATELY FOR TEXT FILES");
54
 
55
     BEGIN
56
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
57
     EXCEPTION
58
          WHEN USE_ERROR =>
59
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE WITH " &
60
                               "OUT_FILE MODE");
61
               RAISE INCOMPLETE;
62
          WHEN NAME_ERROR =>
63
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE WITH " &
64
                               "OUT_FILE MODE");
65
               RAISE INCOMPLETE;
66
     END;
67
 
68
     BEGIN
69
          CREATE (FILE, OUT_FILE);
70
          FAILED ("STATUS_ERROR NOT RAISED FOR CREATE - 1");
71
     EXCEPTION
72
          WHEN STATUS_ERROR =>
73
               NULL;
74
          WHEN OTHERS =>
75
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR CREATE - 1");
76
     END;
77
 
78
     BEGIN
79
          CREATE (FILE, IN_FILE);
80
          FAILED ("STATUS_ERROR NOT RAISED FOR CREATE - 2");
81
     EXCEPTION
82
          WHEN STATUS_ERROR =>
83
               NULL;
84
          WHEN OTHERS =>
85
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR CREATE - 2");
86
     END;
87
 
88
     BEGIN
89
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
90
          FAILED ("STATUS_ERROR NOT RAISED FOR CREATE - 3");
91
     EXCEPTION
92
          WHEN STATUS_ERROR =>
93
               NULL;
94
          WHEN OTHERS =>
95
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR CREATE - 3");
96
     END;
97
 
98
     BEGIN
99
          OPEN (FILE, OUT_FILE, LEGAL_FILE_NAME);
100
          FAILED ("STATUS_ERROR NOT RAISED FOR OPEN - 1");
101
     EXCEPTION
102
          WHEN STATUS_ERROR =>
103
               NULL;
104
          WHEN OTHERS =>
105
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR OPEN - 1");
106
     END;
107
 
108
     BEGIN
109
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
110
          FAILED ("STATUS_ERROR NOT RAISED FOR OPEN - 2");
111
     EXCEPTION
112
          WHEN STATUS_ERROR =>
113
               NULL;
114
          WHEN OTHERS =>
115
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR OPEN - 2");
116
     END;
117
 
118
     BEGIN
119
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME (2, "CE3102A"));
120
          FAILED ("STATUS_ERROR NOT RAISED FOR OPEN - 3");
121
     EXCEPTION
122
          WHEN STATUS_ERROR =>
123
               NULL;
124
          WHEN OTHERS =>
125
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR OPEN - 3");
126
     END;
127
 
128
     BEGIN
129
          CREATE (FILE, IN_FILE, LEGAL_FILE_NAME (2, "CE3102A"));
130
          FAILED ("STATUS_ERROR NOT RAISED FOR OPEN - 4");
131
     EXCEPTION
132
          WHEN STATUS_ERROR =>
133
               NULL;
134
          WHEN OTHERS =>
135
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR OPEN - 4");
136
     END;
137
 
138
     BEGIN
139
          DELETE (FILE);
140
     EXCEPTION
141
          WHEN USE_ERROR =>
142
               NULL;
143
     END;
144
 
145
     RESULT;
146
 
147
EXCEPTION
148
     WHEN INCOMPLETE =>
149
          RESULT;
150
 
151
END CE3102A;

powered by: WebSVN 2.1.0

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