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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2102L.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 TO SEE THAT STATUS_ERROR IS RAISED WHEN PERFORMING ILLEGAL
27
--     OPERATIONS ON OPENED OR UNOPENED FILES OF TYPE SEQUENTIAL_IO.
28
 
29
--          B) UNOPENED FILES
30
 
31
-- HISTORY:
32
--     SPW 07/29/87  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
WITH SEQUENTIAL_IO;
36
 
37
PROCEDURE CE2102L IS
38
 
39
     PACKAGE SEQ_IO IS NEW SEQUENTIAL_IO(INTEGER);
40
     USE SEQ_IO;
41
 
42
     TEST_FILE_ONE : SEQ_IO.FILE_TYPE;
43
     STR : STRING (1 .. 10);
44
     FL_MODE : SEQ_IO.FILE_MODE ;
45
 
46
BEGIN
47
 
48
     TEST ("CE2102L", "CHECK THAT STATUS_ERROR IS RAISED WHEN " &
49
                      "PERFORMING ILLEGAL OPERATIONS ON UNOPENED " &
50
                      "FILES OF TYPE SEQUENTIAL_IO");
51
 
52
-- CHECK TO SEE THAT PROPER EXCEPTIONS ARE RAISED WHEN
53
-- PERFORMING OPERATIONS ON AN UNOPENED FILE
54
 
55
-- CLOSE AN UNOPENED FILE
56
 
57
     BEGIN
58
          CLOSE (TEST_FILE_ONE);
59
          FAILED ("STATUS_ERROR NOT RAISED WHEN AN UNOPENED " &
60
                  "FILE IS USED IN A CLOSE");
61
     EXCEPTION
62
          WHEN STATUS_ERROR =>
63
               NULL;
64
          WHEN OTHERS =>
65
               FAILED ("WRONG EXCEPTION RAISED ON CLOSE");
66
     END;
67
 
68
-- DELETE AN UNOPENED FILE
69
 
70
     BEGIN
71
          DELETE (TEST_FILE_ONE);
72
          FAILED ("STATUS_ERROR NOT RAISED WHEN AN UNOPENED " &
73
                  "FILE IS USED IN A DELETE");
74
     EXCEPTION
75
          WHEN STATUS_ERROR =>
76
               NULL;
77
          WHEN OTHERS =>
78
               FAILED ("WRONG EXCEPTION RAISED ON DELETE");
79
     END;
80
 
81
-- RESET UNOPENED FILE
82
 
83
     BEGIN
84
          RESET (TEST_FILE_ONE);
85
          FAILED ("STATUS_ERROR NOT RAISED WHEN AN UNOPENED " &
86
                  "FILE IS USED IN A RESET");
87
     EXCEPTION
88
          WHEN STATUS_ERROR =>
89
               NULL;
90
          WHEN OTHERS =>
91
               FAILED ("WRONG EXCEPTION RAISED ON RESET");
92
     END;
93
 
94
     BEGIN
95
          RESET (TEST_FILE_ONE, IN_FILE);
96
          FAILED ("STATUS_ERROR NOT RAISED WHEN A UNOPENED FILE " &
97
                  "IS USED IN A RESET WITH MODE PARAMETER");
98
     EXCEPTION
99
          WHEN STATUS_ERROR =>
100
               NULL;
101
          WHEN OTHERS =>
102
               FAILED ("WRONG EXCEPTION RAISED ON RESET " &
103
                       "WITH MODE");
104
     END;
105
 
106
-- ATTEMPT TO DETERMINE MODE OF UNOPENED FILE
107
 
108
     BEGIN
109
          FL_MODE := MODE (TEST_FILE_ONE);
110
          FAILED ("STATUS_ERROR NOT RAISED WHEN A UNOPENED " &
111
                  "FILE IS USED IN A MODE OPERATION");
112
     EXCEPTION
113
          WHEN STATUS_ERROR =>
114
               NULL;
115
          WHEN OTHERS =>
116
               FAILED ("WRONG EXCEPTION RAISED ON MODE");
117
     END;
118
 
119
-- ATTEMPT TO DETERMINE NAME OF UNOPENED FILE
120
 
121
     BEGIN
122
          STR := NAME (TEST_FILE_ONE);
123
          FAILED ("STATUS_ERROR NOT RAISED WHEN A UNOPENED " &
124
                  "FILE IS USED IN A NAME OPERATION");
125
     EXCEPTION
126
          WHEN STATUS_ERROR =>
127
               NULL;
128
          WHEN OTHERS =>
129
               FAILED ("WRONG EXCEPTION RAISED ON NAME");
130
     END;
131
 
132
--ATTEMPT TO DETERMINE FORM OF UNOPENED FILE
133
 
134
     BEGIN
135
          STR := FORM (TEST_FILE_ONE);
136
          FAILED ("STATUS_ERROR NOT RAISED WHEN AN UNOPENED " &
137
                  "FILE IS USED IN A FORM OPERATION");
138
     EXCEPTION
139
          WHEN STATUS_ERROR =>
140
               NULL;
141
          WHEN OTHERS =>
142
               FAILED ("WRONG EXCEPTION RAISED ON FORM");
143
     END;
144
 
145
     RESULT;
146
 
147
END CE2102L;

powered by: WebSVN 2.1.0

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