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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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