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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2106A.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 AFTER A SUCCESSFUL DELETE OF AN EXTERNAL FILE, THE
27
--     NAME OF THE FILE CAN BE USED IN A CREATE OPERATION.
28
 
29
--          A) SEQUENTIAL FILES
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     CREATION WITH OUT_FILE MODE FOR SEQUENTIAL FILES AND
34
--     DELETION OF EXTERNAL FILES.
35
 
36
-- HISTORY:
37
--     SPS 08/25/82
38
--     SPS 11/09/82
39
--     JBG 02/22/84  CHANGED TO .ADA TEST.
40
--     TBN 02/12/86  SPLIT TEST.  PUT DIRECT_IO INTO CE2106B.ADA.
41
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
42
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
43
--     SPW 08/07/87  INSERTED ALLOWABLE EXCEPTION USE_ERROR ON
44
--                   DELETE.
45
 
46
WITH REPORT; USE REPORT;
47
WITH SEQUENTIAL_IO;
48
 
49
PROCEDURE CE2106A IS
50
 
51
BEGIN
52
 
53
     TEST ("CE2106A", "CHECK THAT AN EXTERNAL FILE CAN BE CREATED " &
54
                      "AFTER AN EXTERNAL FILE WITH SAME NAME HAS " &
55
                      "BEEN DELETED FOR SEQUENTIAL_IO");
56
 
57
     DECLARE
58
          PACKAGE SEQ IS NEW SEQUENTIAL_IO (INTEGER);
59
          USE SEQ;
60
          FL1 : FILE_TYPE;
61
          FL2 : FILE_TYPE;
62
          T_FAILED : BOOLEAN := FALSE;
63
          D_FILE : BOOLEAN := FALSE;
64
     BEGIN
65
          BEGIN
66
               CREATE (FL1, OUT_FILE, LEGAL_FILE_NAME);
67
          EXCEPTION
68
               WHEN USE_ERROR =>
69
                    NOT_APPLICABLE ("USE_ERROR RAISED; SEQUENTIAL " &
70
                                    "CREATE WITH OUT_FILE MODE");
71
                    T_FAILED := TRUE;
72
               WHEN NAME_ERROR =>
73
                    NOT_APPLICABLE ("NAME_ERROR RAISED; SEQUENTIAL " &
74
                                    "CREATE WITH OUT_FILE MODE");
75
                    T_FAILED := TRUE;
76
               WHEN OTHERS =>
77
                    FAILED ("UNEXPECTED EXCEPTION RAISED; SEQUENTIAL " &
78
                            "CREATE");
79
                    T_FAILED := TRUE;
80
          END;
81
 
82
          IF NOT T_FAILED THEN
83
               BEGIN
84
                    DELETE (FL1);
85
               EXCEPTION
86
                    WHEN USE_ERROR =>
87
                         NOT_APPLICABLE ("DELETION OF EXTERNAL FILE " &
88
                                         "IS NOT SUPPORTED");
89
                         T_FAILED := TRUE;
90
                    WHEN OTHERS =>
91
                         FAILED ("UNEXPECTED EXCEPTION RAISED ON " &
92
                                 "DELETE");
93
                         T_FAILED := TRUE;
94
               END;
95
          END IF;
96
 
97
          IF NOT T_FAILED THEN
98
               BEGIN
99
                    CREATE (FL2, OUT_FILE, LEGAL_FILE_NAME);
100
                    D_FILE := TRUE;
101
               EXCEPTION
102
                    WHEN USE_ERROR =>
103
                         FAILED ("USE_ERROR FOR RECREATE - SEQ");
104
                    WHEN OTHERS =>
105
                         FAILED ("UNABLE TO RECREATE FILE AFTER " &
106
                                 "DELETION - SEQ");
107
               END;
108
 
109
               IF D_FILE THEN
110
                    BEGIN
111
                         DELETE (FL2);
112
                    EXCEPTION
113
                         WHEN USE_ERROR =>
114
                              FAILED ("USE_ERROR FOR DELETE - SEQ");
115
                    END;
116
               END IF;
117
          END IF;
118
     END;
119
 
120
     RESULT;
121
 
122
END CE2106A;

powered by: WebSVN 2.1.0

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