OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3405C.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 NEW_PAGE RAISES MODE_ERROR IF THE FILE SPECIFIED
27
--     HAS MODE IN_FILE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
31
--     SUPPORT TEXT FILES.
32
 
33
-- HISTORY:
34
--     ABW 08/26/82
35
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
36
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
37
--     DWC 09/23/87  CREATED AN EXTERNAL FILE, REMOVED DEPENDENCE ON
38
--                   RESET, AND CHECKED FOR USE_ERROR ON DELETE.
39
 
40
WITH REPORT;
41
USE REPORT;
42
WITH TEXT_IO;
43
USE TEXT_IO;
44
 
45
PROCEDURE CE3405C IS
46
 
47
     INCOMPLETE : EXCEPTION;
48
     FILE : FILE_TYPE;
49
 
50
BEGIN
51
 
52
     TEST ("CE3405C", "CHECK THAT NEW_PAGE RAISES MODE_ERROR IF THE " &
53
                      "FILE SPECIFIED HAS MODE IN_FILE");
54
 
55
     BEGIN
56
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
57
     EXCEPTION
58
          WHEN USE_ERROR =>
59
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
60
                               "WITH OUT_FILE MODE");
61
               RAISE INCOMPLETE;
62
          WHEN NAME_ERROR =>
63
               NOT_APPLICABLE ("NAME_ERROR RAISED; TEXT CREATE " &
64
                               "WITH OUT_FILE MODE");
65
               RAISE INCOMPLETE;
66
          WHEN OTHERS =>
67
               FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT CREATE");
68
               RAISE INCOMPLETE;
69
     END;
70
 
71
     PUT (FILE, "STUFF");
72
 
73
     CLOSE (FILE);
74
     BEGIN
75
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
76
     EXCEPTION
77
          WHEN USE_ERROR =>
78
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT OPEN " &
79
                               "WITH IN_FILE MODE");
80
               RAISE INCOMPLETE;
81
     END;
82
 
83
     BEGIN
84
          NEW_PAGE (FILE);
85
          FAILED ("MODE_ERROR NOT RAISED FOR IN_FILE");
86
     EXCEPTION
87
          WHEN MODE_ERROR =>
88
               NULL;
89
          WHEN OTHERS =>
90
               FAILED ("OTHER EXCEPTION RAISED FOR IN_FILE");
91
     END;
92
 
93
     BEGIN
94
          NEW_PAGE (STANDARD_INPUT);
95
          FAILED ("MODE_ERROR NOT RAISED FOR STANDARD_INPUT");
96
     EXCEPTION
97
          WHEN MODE_ERROR =>
98
               NULL;
99
          WHEN OTHERS =>
100
               FAILED ("OTHER EXCEPTION RAISED FOR STANDARD_INPUT");
101
     END;
102
 
103
     BEGIN
104
          NEW_PAGE (CURRENT_INPUT);
105
          FAILED ("MODE_ERROR NOT RAISED FOR CURRENT_INPUT");
106
     EXCEPTION
107
          WHEN MODE_ERROR =>
108
               NULL;
109
          WHEN OTHERS =>
110
               FAILED ("OTHER EXCEPTION RAISED FOR CURRENT_INPUT");
111
     END;
112
 
113
     BEGIN
114
          DELETE (FILE);
115
     EXCEPTION
116
          WHEN USE_ERROR =>
117
               NULL;
118
     END;
119
 
120
     RESULT;
121
 
122
EXCEPTION
123
     WHEN INCOMPLETE =>
124
          RESULT;
125
 
126
END CE3405C;

powered by: WebSVN 2.1.0

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