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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce2201c.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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