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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2108F.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 SEQUENTIAL FILE SPECIFIED BY A NON-NULL
27
--     STRING NAME IS ACCESSIBLE AFTER THE COMPLETION OF THE MAIN
28
--     PROGRAM.
29
 
30
--     THIS TEST CHECKS THE CREATION OF A SEQUENTIAL FILE WHICH WAS
31
--     CREATED BY CE2108E.ADA.
32
 
33
-- APPLICABILITY CRITERIA:
34
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
35
--     SEQUENTIAL FILES.
36
 
37
-- HISTORY:
38
--     TBN 07/16/87  CREATED ORIGINAL TESTED.
39
 
40
WITH REPORT; USE REPORT;
41
WITH SEQUENTIAL_IO;
42
 
43
PROCEDURE CE2108F IS
44
 
45
     PACKAGE SEQ IS NEW SEQUENTIAL_IO (INTEGER);
46
     USE SEQ;
47
     INCOMPLETE : EXCEPTION;
48
     CHECK_SUPPORT, FILE_NAME : FILE_TYPE;
49
     PREVENT_EMPTY_FILE : NATURAL := 0;
50
 
51
BEGIN
52
     TEST ("CE2108F", "CHECK THAT AN EXTERNAL SEQUENTIAL FILE " &
53
                      "SPECIFIED BY A NON-NULL STRING NAME IS " &
54
                      "ACCESSIBLE AFTER THE COMPLETION OF THE MAIN " &
55
                      "PROGRAM");
56
 
57
     -- TEST FOR SEQUENTIAL FILE SUPPORT.
58
 
59
     BEGIN
60
          CREATE (CHECK_SUPPORT, OUT_FILE, LEGAL_FILE_NAME);
61
          BEGIN
62
               DELETE (CHECK_SUPPORT);
63
          EXCEPTION
64
               WHEN USE_ERROR =>
65
                    NULL;
66
               WHEN OTHERS =>
67
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON DELETE");
68
          END;
69
     EXCEPTION
70
          WHEN USE_ERROR =>
71
               NOT_APPLICABLE ("USE_ERROR RAISED ON SEQUENTIAL " &
72
                               "CREATE WITH OUT_FILE MODE");
73
               RAISE INCOMPLETE;
74
          WHEN NAME_ERROR =>
75
               NOT_APPLICABLE ("NAME_ERROR RAISED ON SEQUENTIAL " &
76
                               "CREATE WITH OUT_FILE MODE");
77
               RAISE INCOMPLETE;
78
          WHEN OTHERS =>
79
               FAILED ("UNEXPECTED EXCEPTION RAISED ON " &
80
                       "SEQUENTIAL CREATE");
81
               RAISE INCOMPLETE;
82
     END;
83
 
84
     -- BEGIN TEST OBJECTIVE.
85
 
86
     BEGIN
87
          OPEN (FILE_NAME, IN_FILE, LEGAL_FILE_NAME(1, "CE2108E"));
88
     EXCEPTION
89
          WHEN USE_ERROR =>
90
               NOT_APPLICABLE ("USE_ERROR RAISED ON OPEN FOR " &
91
                               "SEQUENTIAL FILE WITH IN_FILE " &
92
                               "MODE");
93
               RAISE INCOMPLETE;
94
     END;
95
     READ (FILE_NAME, PREVENT_EMPTY_FILE);
96
     IF PREVENT_EMPTY_FILE /= 5 THEN
97
          FAILED ("OPENED WRONG FILE OR DATA ERROR");
98
     END IF;
99
     BEGIN
100
          DELETE (FILE_NAME);
101
     EXCEPTION
102
          WHEN USE_ERROR =>
103
               COMMENT ("IMPLEMENTATION WOULD NOT ALLOW DELETION OF " &
104
                        "EXTERNAL FILE");
105
     END;
106
 
107
     RESULT;
108
 
109
EXCEPTION
110
     WHEN INCOMPLETE =>
111
          RESULT;
112
END CE2108F;

powered by: WebSVN 2.1.0

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