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/] [e/] [ee3203a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- EE3203A.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 SET_INPUT AND SET_OUTPUT CAN BE USED, AND THAT THEY
27
--     DO NOT REDEFINE OR CLOSE THE CORRESPONDING STANDARD FILES.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES.
32
 
33
-- PASS/FAIL CRITERIA:
34
--     THIS TEST IS PASSED IF IT EXECUTES AND THE STANDARD OUTPUT FILE
35
--     CONTAINS THE LINE "INITIAL TEXT OF STANDARD_OUTPUT".
36
 
37
-- HISTORY:
38
--     ABW 08/25/82
39
--     SPS 11/19/82
40
--     VKG 02/15/83
41
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
42
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
43
--     JLH 08/19/87  CORRECTED EXCEPTION HANDLING, REMOVED DEPENDENCE
44
--                   ON RESET, AND ADDED CHECKS FOR USE_ERROR ON DELETE.
45
 
46
WITH REPORT;
47
USE REPORT;
48
WITH TEXT_IO;
49
USE TEXT_IO;
50
WITH CHECK_FILE;
51
 
52
PROCEDURE EE3203A IS
53
 
54
     INCOMPLETE : EXCEPTION;
55
     FILE_IN, FILE_OUT : FILE_TYPE;
56
     LST : NATURAL;
57
     IN_STR : STRING (1 .. 50);
58
 
59
BEGIN
60
 
61
     TEST ("EE3203A", "CHECK THAT SET_INPUT AND SET_OUTPUT " &
62
                      "CAN BE USED, AND THAT CORRESPONDING " &
63
                      "STANDARD FILES ARE UNCHANGED");
64
 
65
     BEGIN
66
          CREATE (FILE_IN, OUT_FILE, LEGAL_FILE_NAME);
67
     EXCEPTION
68
          WHEN USE_ERROR =>
69
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE WITH " &
70
                               "OUT_FILE MODE - 1");
71
               RAISE INCOMPLETE;
72
          WHEN NAME_ERROR =>
73
               NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT CREATE " &
74
                               "WITH OUT_FILE MODE - 1");
75
               RAISE INCOMPLETE;
76
          WHEN OTHERS =>
77
               FAILED ("UNEXPECTED EXCEPTION RAISED ON TEXT CREATE");
78
               RAISE INCOMPLETE;
79
     END;
80
 
81
     BEGIN
82
          CREATE (FILE_OUT, OUT_FILE, LEGAL_FILE_NAME(2));
83
     EXCEPTION
84
          WHEN USE_ERROR =>
85
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE WITH " &
86
                               "OUT_FILE MODE - 2");
87
               RAISE INCOMPLETE;
88
          WHEN NAME_ERROR =>
89
               NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT CREATE " &
90
                               "WITH OUT_FILE MODE - 2");
91
               RAISE INCOMPLETE;
92
          WHEN OTHERS =>
93
               FAILED ("UNEXPECTED EXCEPTION RAISED ON TEXT CREATE");
94
               RAISE INCOMPLETE;
95
     END;
96
 
97
     PUT (FILE_IN, "INITIAL TEXT OF FILE_IN");
98
     PUT (FILE_OUT, "INITIAL TEXT OF FILE_OUT");
99
     PUT ("INITIAL TEXT OF STANDARD_OUTPUT");
100
 
101
     CLOSE (FILE_IN);
102
 
103
     BEGIN
104
          OPEN (FILE_IN, IN_FILE, LEGAL_FILE_NAME);
105
     EXCEPTION
106
          WHEN USE_ERROR =>
107
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN WITH " &
108
                               "IN_FILE MODE");
109
               RAISE INCOMPLETE;
110
     END;
111
 
112
     SET_INPUT (FILE_IN);
113
     SET_OUTPUT (FILE_OUT);
114
 
115
     IF NOT IS_OPEN (STANDARD_INPUT) THEN
116
          FAILED ("STANDARD_INPUT NOT OPEN");
117
     END IF;
118
 
119
     IF NOT IS_OPEN (FILE_IN) THEN
120
          FAILED ("FILE_IN NOT OPEN");
121
     END IF;
122
 
123
     IF NOT IS_OPEN (STANDARD_OUTPUT) THEN
124
          FAILED ("STANDARD_OUTPUT NOT OPEN");
125
     END IF;
126
 
127
     IF NOT IS_OPEN (FILE_OUT) THEN
128
          FAILED ("FILE_OUT NOT OPEN");
129
     END IF;
130
 
131
     NEW_LINE;
132
     PUT ("SECOND LINE OF OUTPUT");
133
 
134
     GET_LINE (IN_STR, LST);
135
     IF IN_STR (1 .. LST) /= "INITIAL TEXT OF FILE_IN" THEN
136
          FAILED ("DEFAULT INPUT INCORRECT");
137
     END IF;
138
 
139
     CHECK_FILE (FILE_IN, "INITIAL TEXT OF FILE_IN#@%");
140
     SET_OUTPUT (FILE => STANDARD_OUTPUT);
141
     SET_INPUT (FILE => STANDARD_INPUT);
142
     CHECK_FILE (FILE_OUT, "INITIAL TEXT OF FILE_OUT#" &
143
                           "SECOND LINE OF OUTPUT#@%");
144
 
145
     SPECIAL_ACTION ("THE STANDARD OUTPUT FILE SHOULD CONTAIN " &
146
                     "THE LINE : INITIAL TEXT OF STANDARD_OUTPUT");
147
 
148
     BEGIN
149
          DELETE (FILE_IN);
150
     EXCEPTION
151
          WHEN USE_ERROR =>
152
               NULL;
153
     END;
154
 
155
     BEGIN
156
          DELETE (FILE_OUT);
157
     EXCEPTION
158
          WHEN USE_ERROR =>
159
               NULL;
160
     END;
161
 
162
     RESULT;
163
 
164
EXCEPTION
165
     WHEN INCOMPLETE =>
166
          RESULT;
167
 
168
END EE3203A;

powered by: WebSVN 2.1.0

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