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/] [ce3110a.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
-- CE3110A.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
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     CREATION AND DELETION OF TEXT FILES.
32
 
33
-- HISTORY:
34
--     SPS 08/25/82
35
--     SPS 11/09/82
36
--     JBG 06/04/84
37
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
38
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
39
--     DWC 08/18/87  CORRECTED EXCEPTION FORMAT.
40
 
41
WITH REPORT; USE REPORT;
42
WITH TEXT_IO; USE TEXT_IO;
43
 
44
PROCEDURE CE3110A IS
45
BEGIN
46
 
47
     TEST ("CE3110A", "CHECK THAT AN EXTERNAL FILE CAN BE CREATED " &
48
                      "AFTER AN EXTERNAL FILE WITH SAME NAME HAS BEEN" &
49
                      " DELETED");
50
     DECLARE
51
          FL1 : FILE_TYPE;
52
          FL2 : FILE_TYPE;
53
          T_FAILED : BOOLEAN := FALSE;
54
          D_FILE : BOOLEAN := FALSE;
55
     BEGIN
56
          BEGIN
57
               CREATE (FL1, OUT_FILE, LEGAL_FILE_NAME);
58
          EXCEPTION
59
               WHEN USE_ERROR =>
60
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
61
                                    "WITH OUT_FILE MODE");
62
                    T_FAILED := TRUE;
63
               WHEN NAME_ERROR =>
64
                    NOT_APPLICABLE ("NAME_ERROR RAISED; TEXT CREATE " &
65
                                    "WITH OUT_FILE MODE");
66
                    T_FAILED := TRUE;
67
               WHEN OTHERS =>
68
                    FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT " &
69
                            "CREATE WITH OUT_FILE MODE");
70
                    T_FAILED := TRUE;
71
          END;
72
 
73
          IF NOT T_FAILED THEN
74
               BEGIN
75
                    DELETE (FL1);
76
               EXCEPTION
77
                    WHEN USE_ERROR =>
78
                         NOT_APPLICABLE ("DELETION OF EXTERNAL " &
79
                                         "FILES NOT SUPPORTED");
80
                         T_FAILED := TRUE;
81
               END;
82
          END IF;
83
 
84
          IF NOT T_FAILED THEN
85
               BEGIN
86
                    CREATE (FL2, OUT_FILE, LEGAL_FILE_NAME);
87
                    D_FILE := TRUE;
88
               EXCEPTION
89
                    WHEN OTHERS =>
90
                         FAILED ("UNABLE TO RECREATE FILE AFTER " &
91
                                 "DELETION - TEXT");
92
               END;
93
               IF D_FILE THEN
94
                    BEGIN
95
                         DELETE (FL2);
96
                    EXCEPTION
97
                         WHEN OTHERS =>
98
                              FAILED ("DELETE SHOULD STILL BE " &
99
                                      "SUPPORTED");
100
                    END;
101
               END IF;
102
          END IF;
103
     END;
104
 
105
     RESULT;
106
 
107
END CE3110A;

powered by: WebSVN 2.1.0

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