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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3804C.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
-- HISTORY:
26
--     CHECK THAT GET FOR FLOAT_IO RAISES MODE_ERROR WHEN THE
27
--     MODE IS NOT IN_FILE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH
31
--     SUPPORT TEXT FILES.
32
 
33
-- HISTORY:
34
--     SPS 09/07/82
35
--     JBG 02/22/84  CHANGED TO .ADA TEST
36
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
37
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
38
--     DWC 09/11/87  SPLIT CASE FOR FIXED_IO INTO CE3804O.ADA
39
--                   AND CORRECTED EXCEPTION HANDLING.
40
 
41
WITH REPORT;
42
USE REPORT;
43
WITH TEXT_IO;
44
USE TEXT_IO;
45
 
46
PROCEDURE CE3804C IS
47
     INCOMPLETE : EXCEPTION;
48
 
49
BEGIN
50
 
51
     TEST ("CE3804C", "CHECK THAT GET FOR FLOAT_IO RAISES " &
52
                      "MODE_ERROR WHEN THE MODE IS NOT IN_FILE");
53
 
54
     DECLARE
55
          FT2 : FILE_TYPE;
56
     BEGIN
57
 
58
          BEGIN
59
               CREATE (FT2, OUT_FILE);
60
          EXCEPTION
61
               WHEN USE_ERROR =>
62
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
63
                                    "FOR TEMP FILES WITH OUT_FILE " &
64
                                    "MODE - 1");
65
                    RAISE INCOMPLETE;
66
          END;
67
 
68
          DECLARE
69
               PACKAGE FL_IO IS NEW FLOAT_IO (FLOAT);
70
               USE FL_IO;
71
               X : FLOAT;
72
          BEGIN
73
 
74
               BEGIN
75
                    GET (FT2, X);
76
                    FAILED ("MODE_ERROR NOT RAISED - FLOAT " &
77
                            "UN-NAMED FILE");
78
               EXCEPTION
79
                    WHEN MODE_ERROR =>
80
                         NULL;
81
                    WHEN OTHERS =>
82
                         FAILED ("WRONG EXCEPTION RAISED - " &
83
                                 "FLOAT UN-NAMED FILE");
84
               END;
85
 
86
               BEGIN
87
                    GET (STANDARD_OUTPUT, X);
88
                    FAILED ("MODE_ERROR NOT RAISED - FLOAT " &
89
                            "STANDARD_OUTPUT");
90
               EXCEPTION
91
                    WHEN MODE_ERROR =>
92
                         NULL;
93
                    WHEN OTHERS =>
94
                         FAILED ("WRONG EXCEPTION RAISED - " &
95
                                 "FLOAT STANDARD_OUTPUT");
96
               END;
97
 
98
               BEGIN
99
                    GET (CURRENT_OUTPUT, X);
100
                    FAILED ("MODE_ERROR NOT RAISED - FLOAT " &
101
                            "CURRENT_OUTPUT");
102
               EXCEPTION
103
                    WHEN MODE_ERROR =>
104
                         NULL;
105
                    WHEN OTHERS =>
106
                         FAILED ("WRONG EXCEPTION RAISED - " &
107
                                 "FLOAT CURRENT_OUTPUT");
108
               END;
109
 
110
          END;
111
 
112
          CLOSE (FT2);
113
 
114
     EXCEPTION
115
          WHEN INCOMPLETE =>
116
               NULL;
117
     END;
118
 
119
     RESULT;
120
 
121
END CE3804C;

powered by: WebSVN 2.1.0

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