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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3806A.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 PUT FOR FLOAT_IO RAISES MODE_ERROR FOR FILES OF
27
--     MODE IN_FILE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES.
32
 
33
-- HISTORY:
34
--     SPS 09/10/82
35
--     JBG 02/22/84  CHANGED TO .ADA TEST
36
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
37
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
38
--     JLH 09/11/87  REMOVED DEPENDENCE ON RESET AND CORRECTED
39
--                   EXCEPTION HANDLING.
40
 
41
WITH REPORT;
42
USE REPORT;
43
WITH TEXT_IO;
44
USE TEXT_IO;
45
 
46
PROCEDURE CE3806A IS
47
 
48
BEGIN
49
 
50
     TEST ("CE3806A", "CHECK THAT PUT FOR FLOAT_IO RAISES MODE_ERROR " &
51
                      "FOR FILES OF MODE IN_FILE");
52
 
53
     DECLARE
54
          FT1 : FILE_TYPE;
55
          PACKAGE FL_IO IS NEW FLOAT_IO (FLOAT);
56
          USE FL_IO;
57
          INCOMPLETE : EXCEPTION;
58
          X : FLOAT := -34.267/19.2;
59
 
60
     BEGIN
61
 
62
          BEGIN
63
               CREATE (FT1, OUT_FILE, LEGAL_FILE_NAME);
64
          EXCEPTION
65
               WHEN USE_ERROR =>
66
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
67
                                    "WITH OUT_FILE MODE");
68
                    RAISE INCOMPLETE;
69
               WHEN NAME_ERROR =>
70
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT " &
71
                                    "CREATE WITH OUT_FILE MODE");
72
                    RAISE INCOMPLETE;
73
          END;
74
 
75
          PUT (FT1, 'A');
76
          CLOSE (FT1);
77
 
78
          BEGIN
79
               OPEN (FT1, IN_FILE, LEGAL_FILE_NAME);
80
          EXCEPTION
81
               WHEN USE_ERROR =>
82
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN " &
83
                                    "WITH IN_FILE MODE");
84
                    RAISE INCOMPLETE;
85
          END;
86
 
87
          BEGIN
88
               PUT (FT1, X);
89
               FAILED ("MODE_ERROR NOT RAISED - 1");
90
          EXCEPTION
91
               WHEN MODE_ERROR =>
92
                    NULL;
93
               WHEN OTHERS =>
94
                    FAILED ("WRONG EXCEPTION RAISED - 1");
95
          END;
96
 
97
          BEGIN
98
               PUT (STANDARD_INPUT, X);
99
               FAILED ("MODE_ERROR NOT RAISED - 2");
100
          EXCEPTION
101
               WHEN MODE_ERROR =>
102
                    NULL;
103
               WHEN OTHERS =>
104
                    FAILED ("WRONG EXCEPTION RAISED - 2");
105
          END;
106
 
107
          BEGIN
108
               PUT (CURRENT_INPUT, X);
109
               FAILED ("MODE_ERROR NOT RAISED - 3");
110
          EXCEPTION
111
               WHEN MODE_ERROR =>
112
                    NULL;
113
               WHEN OTHERS =>
114
                    FAILED ("WRONG EXCEPTION RAISED - 3");
115
          END;
116
 
117
          BEGIN
118
               DELETE (FT1);
119
          EXCEPTION
120
               WHEN USE_ERROR =>
121
                    NULL;
122
          END;
123
 
124
     EXCEPTION
125
          WHEN INCOMPLETE =>
126
               NULL;
127
 
128
     END;
129
 
130
     RESULT;
131
 
132
END CE3806A;

powered by: WebSVN 2.1.0

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