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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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