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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3102F.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 USE_ERROR IS RAISED WHEN AN EXTERNAL FILE
27
--     CANNOT BE RESET.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES, BUT DO NOT SUPPORT RESET OF EXTERNAL FILES.
32
 
33
-- HISTORY:
34
--     JLH 08/12/87  CREATED ORIGINAL TEST.
35
 
36
WITH REPORT;
37
USE REPORT;
38
WITH TEXT_IO;
39
USE TEXT_IO;
40
 
41
PROCEDURE CE3102F IS
42
 
43
     INCOMPLETE : EXCEPTION;
44
     FILE : FILE_TYPE;
45
 
46
BEGIN
47
 
48
     TEST ("CE3102F", "CHECK THAT USE_ERROR IS RAISED WHEN AN " &
49
                      "EXTERNAL FILE CANNOT BE RESET");
50
 
51
     BEGIN
52
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
53
     EXCEPTION
54
          WHEN USE_ERROR =>
55
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE");
56
               RAISE INCOMPLETE;
57
          WHEN NAME_ERROR =>
58
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE");
59
               RAISE INCOMPLETE;
60
     END;
61
 
62
     BEGIN
63
          RESET (FILE);
64
          NOT_APPLICABLE ("RESET FOR OUT_FILE MODE ALLOWED - 1");
65
     EXCEPTION
66
          WHEN USE_ERROR =>
67
               NULL;
68
          WHEN OTHERS =>
69
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR RESET - 1");
70
     END;
71
 
72
     PUT (FILE, "HELLO");
73
 
74
     BEGIN
75
          RESET (FILE, IN_FILE);
76
          NOT_APPLICABLE ("RESET FROM OUT_FILE TO IN_FILE MODE " &
77
                          "ALLOWED - 1");
78
     EXCEPTION
79
          WHEN USE_ERROR =>
80
               NULL;
81
          WHEN OTHERS =>
82
               FAILED ("UNEXPECTED EXCEPTION RASIED FOR RESET - 2");
83
     END;
84
 
85
     CLOSE (FILE);
86
 
87
     BEGIN
88
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
89
     EXCEPTION
90
          WHEN USE_ERROR =>
91
               NOT_APPLICABLE ("TEXT_IO NOT SUPPORTED FOR IN_FILE " &
92
                               "OPEN");
93
               RAISE INCOMPLETE;
94
     END;
95
 
96
     BEGIN
97
          RESET (FILE);
98
          NOT_APPLICABLE ("RESET FOR IN_FILE MODE ALLOWED - 2");
99
     EXCEPTION
100
          WHEN USE_ERROR =>
101
               NULL;
102
          WHEN OTHERS =>
103
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR RESET - 3");
104
     END;
105
 
106
     BEGIN
107
          RESET (FILE, OUT_FILE);
108
          NOT_APPLICABLE ("RESET FROM IN_FILE TO OUT_FILE MODE " &
109
                          "ALLOWED - 2");
110
     EXCEPTION
111
          WHEN USE_ERROR =>
112
               NULL;
113
          WHEN OTHERS =>
114
               FAILED ("UNEXPECTED EXCEPTION RAISED FOR RESET - 4");
115
     END;
116
 
117
     BEGIN
118
          DELETE (FILE);
119
     EXCEPTION
120
          WHEN USE_ERROR =>
121
               NULL;
122
     END;
123
 
124
     RESULT;
125
 
126
EXCEPTION
127
     WHEN INCOMPLETE =>
128
          RESULT;
129
 
130
END CE3102F;

powered by: WebSVN 2.1.0

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