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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2104A.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 A FILE CAN BE CLOSED AND THEN RE-OPENED.
27
 
28
--          A) SEQUENTIAL FILES
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHOSE
32
--     ENVIRONMENT SUPPORTS CREATE/OPEN FOR THE GIVEN MODE.
33
 
34
-- HISTORY:
35
--     DLD 08/11/82
36
--     SPS 11/09/82
37
--     JBG 03/24/83
38
--     EG  06/03/85
39
--     SPW 08/07/87  REMOVED UNNECESSARY CODE AND CORRECTED EXCEPTION
40
--                   HANDLING.
41
 
42
WITH REPORT; USE REPORT;
43
WITH SEQUENTIAL_IO;
44
 
45
PROCEDURE CE2104A IS
46
 
47
     PACKAGE SEQ_IO IS NEW SEQUENTIAL_IO(INTEGER);
48
     USE SEQ_IO;
49
 
50
     SEQ_FILE : SEQ_IO.FILE_TYPE;
51
     VAR : INTEGER;
52
     INCOMPLETE : EXCEPTION;
53
 
54
BEGIN
55
 
56
     TEST ("CE2104A", "CHECK THAT A FILE CAN BE CLOSED " &
57
                      "AND THEN RE-OPENED");
58
 
59
-- INITIALIZE TEST FILE
60
 
61
     BEGIN
62
          CREATE (SEQ_FILE, OUT_FILE, LEGAL_FILE_NAME);
63
     EXCEPTION
64
          WHEN USE_ERROR =>
65
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE WITH " &
66
                               "OUT_FILE MODE");
67
               RAISE INCOMPLETE;
68
          WHEN NAME_ERROR =>
69
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE WITH " &
70
                               "OUT_FILE MODE");
71
               RAISE INCOMPLETE;
72
          WHEN OTHERS =>
73
               FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE");
74
               RAISE INCOMPLETE;
75
 
76
     END;
77
 
78
     WRITE (SEQ_FILE, 17);
79
     CLOSE (SEQ_FILE);
80
 
81
-- RE-OPEN SEQUENTIAL TEST FILE
82
 
83
     BEGIN
84
          OPEN (SEQ_FILE, IN_FILE, LEGAL_FILE_NAME);
85
     EXCEPTION
86
          WHEN USE_ERROR =>
87
               NOT_APPLICABLE ("USE_ERROR RAISED ON OPEN WITH " &
88
                               "IN_FILE MODE");
89
               RAISE INCOMPLETE;
90
     END;
91
 
92
     READ (SEQ_FILE, VAR);
93
     IF VAR /= 17 THEN
94
          FAILED ("WRONG DATA RETURNED FROM READ - " &
95
                  "SEQUENTIAL");
96
     END IF;
97
 
98
-- DELETE TEST FILE
99
 
100
     BEGIN
101
 
102
          DELETE (SEQ_FILE);
103
 
104
     EXCEPTION
105
 
106
          WHEN USE_ERROR =>
107
               NULL;
108
 
109
     END;
110
 
111
     RESULT;
112
 
113
EXCEPTION
114
 
115
     WHEN INCOMPLETE =>
116
          RESULT;
117
 
118
END CE2104A;

powered by: WebSVN 2.1.0

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