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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2110C.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 AN EXTERNAL FILE CEASES TO EXIST AFTER A SUCCESSFUL
27
--     DELETE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--    THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--    CREATION AND DELETION OF DIRECT FILES.
32
 
33
-- HISTORY:
34
--     SPS 08/25/82
35
--     SPS 11/09/82
36
--     JBG 04/01/83
37
--     EG  05/31/85
38
--     JLH 07/21/87  ADDED A CALL TO NOT_APPLICABLE IF EXCEPTION
39
--                   USE_ERROR IS RAISED ON DELETE.
40
 
41
WITH REPORT; USE REPORT;
42
WITH DIRECT_IO;
43
 
44
PROCEDURE CE2110C IS
45
BEGIN
46
 
47
     TEST ("CE2110C", "CHECK THAT THE EXTERNAL FILE CEASES TO EXIST " &
48
                      "AFTER A SUCCESSFUL DELETE");
49
 
50
     DECLARE
51
          PACKAGE DIR IS NEW DIRECT_IO (INTEGER);
52
          USE DIR;
53
          FL1, FL2 : FILE_TYPE;
54
          VAR1 : INTEGER := 5;
55
          INCOMPLETE : EXCEPTION;
56
     BEGIN
57
          BEGIN
58
               CREATE (FL1, OUT_FILE, LEGAL_FILE_NAME);
59
          EXCEPTION
60
               WHEN USE_ERROR =>
61
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
62
                                    "WITH OUT_FILE MODE");
63
                    RAISE INCOMPLETE;
64
               WHEN NAME_ERROR =>
65
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE " &
66
                                    "WITH OUT_FILE MODE");
67
                    RAISE INCOMPLETE;
68
               WHEN OTHERS =>
69
                    FAILED ("UNEXCEPTED EXCEPTION RAISED ON CREATE");
70
                    RAISE INCOMPLETE;
71
          END;
72
 
73
          BEGIN
74
               WRITE (FL1, VAR1);     -- THIS WRITES TO THE FILE IF IT
75
          EXCEPTION                   -- CAN, NOT NECESSARY FOR THE
76
               WHEN OTHERS =>         -- OBJECTIVE.
77
                    NULL;
78
          END;
79
 
80
          BEGIN
81
               DELETE (FL1);
82
          EXCEPTION
83
               WHEN USE_ERROR =>
84
                    NOT_APPLICABLE ("DELETION OF EXTERNAL FILE NOT " &
85
                                    "SUPPORTED");
86
                    RAISE INCOMPLETE;
87
          END;
88
 
89
          BEGIN
90
               OPEN (FL2, IN_FILE, LEGAL_FILE_NAME);
91
               FAILED ("EXTERNAL FILE STILL EXISTS AFTER " &
92
                       "A SUCCESSFUL DELETION - DIR");
93
          EXCEPTION
94
               WHEN NAME_ERROR =>
95
                    NULL;
96
          END;
97
     EXCEPTION
98
          WHEN INCOMPLETE =>
99
               NULL;
100
     END;
101
 
102
     RESULT;
103
 
104
END CE2110C;

powered by: WebSVN 2.1.0

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