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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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