OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce2201m.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- CE2201M.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 READ, WRITE, AND END_OF_FILE ARE SUPPORTED
27
--     FOR SEQUENTIAL FILES WITH ELEMENT_TYPE RECORD WITHOUT
28
--     DISCRIMINANTS.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
32
--     SUPPORT SEQUENTIAL FILES WITH ELEMENT_TYPE RECORD WITHOUT
33
--     DISCRIMINANTS.
34
 
35
-- HISTORY:
36
--     ABW 08/17/82
37
--     SPS 09/15/82
38
--     SPS 11/09/82
39
--     JBG 05/02/83
40
--     EG  05/08/85
41
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
42
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
43
--     JLH 07/28/87  REMOVED THE DEPENDENCE OF RESET BEING SUPPORTED
44
--                   AND CREATED EXTERNAL FILES RATHER THAN TEMPORARY
45
--                   FILES.
46
 
47
WITH REPORT;
48
USE REPORT;
49
WITH SEQUENTIAL_IO;
50
 
51
PROCEDURE CE2201M IS
52
 
53
BEGIN
54
 
55
     TEST ("CE2201M", "CHECK THAT READ, WRITE, AND " &
56
                      "END_OF_FILE ARE SUPPORTED FOR " &
57
                      "SEQUENTIAL FILES - RECORD WITHOUT " &
58
                      "DISCRIMINANTS");
59
 
60
     DECLARE
61
          TYPE REC IS
62
               RECORD
63
                    ONE : INTEGER;
64
                    TWO : INTEGER;
65
               END RECORD;
66
          PACKAGE SEQ_REC IS NEW SEQUENTIAL_IO (REC);
67
          USE SEQ_REC;
68
          FILE_REC : FILE_TYPE;
69
          INCOMPLETE : EXCEPTION;
70
          REC1 : REC := (ONE=>18, TWO=>36);
71
          ITEM_REC1 : REC;
72
     BEGIN
73
 
74
          BEGIN
75
               CREATE (FILE_REC, OUT_FILE, LEGAL_FILE_NAME);
76
          EXCEPTION
77
               WHEN USE_ERROR | NAME_ERROR =>
78
                    NOT_APPLICABLE ("CREATE OF SEQUENTIAL FILE WITH " &
79
                                    "MODE OUT_FILE NOT SUPPORTED");
80
                    RAISE INCOMPLETE;
81
          END;
82
 
83
          WRITE (FILE_REC, REC1);
84
          CLOSE (FILE_REC);
85
 
86
          BEGIN
87
               OPEN (FILE_REC, IN_FILE, LEGAL_FILE_NAME);
88
          EXCEPTION
89
               WHEN USE_ERROR =>
90
                    NOT_APPLICABLE ("OPEN OF SEQUENTIAL FILE WITH " &
91
                                    "MODE IN_FILE NOT SUPPORTED");
92
                    RAISE INCOMPLETE;
93
          END;
94
 
95
          IF END_OF_FILE (FILE_REC) THEN
96
               FAILED ("WRONG END_OF_FILE VALUE FOR TYPE RECORD");
97
          END IF;
98
 
99
          READ (FILE_REC, ITEM_REC1);
100
 
101
          IF ITEM_REC1 /= (18, IDENT_INT(36)) THEN
102
               FAILED ("READ WRONG VALUE - RECORD");
103
          END IF;
104
 
105
          IF NOT END_OF_FILE (FILE_REC) THEN
106
               FAILED ("END OF FILE NOT TRUE - RECORD");
107
          END IF;
108
 
109
          BEGIN
110
               DELETE (FILE_REC);
111
          EXCEPTION
112
               WHEN USE_ERROR =>
113
                    NULL;
114
          END;
115
 
116
     EXCEPTION
117
          WHEN INCOMPLETE =>
118
               NULL;
119
     END;
120
 
121
     RESULT;
122
 
123
END CE2201M;

powered by: WebSVN 2.1.0

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