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

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

Line No. Rev Author Line
1 149 jeremybenn
-- CE3704A.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 INTEGER_IO CAN OPERATE ON ANY FILE OF MODE
27
--     IN_FILE AND THAT IF NO FILE IS SPECIFIED THE CURRENT DEFAULT
28
--     INPUT FILE IS USED.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
32
--     SUPPORT TEXT FILES.
33
 
34
-- HISTORY:
35
--     SPS 10/01/82
36
--     JBG 02/22/84  CHANGED TO .ADA TEST
37
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
38
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
39
--     DWC 09/09/87  REMOVED UNNECESSARY CODE, CORRECTED EXCEPTION
40
--                   HANDLING, AND REMOVED DEPENDENCE ON RESET.
41
 
42
WITH REPORT; USE REPORT;
43
WITH TEXT_IO; USE TEXT_IO;
44
 
45
PROCEDURE CE3704A IS
46
     INCOMPLETE : EXCEPTION;
47
 
48
BEGIN
49
 
50
     TEST ("CE3704A", "CHECK THAT GET FOR INTEGER_IO CAN OPERATE " &
51
                      "ON ANY FILE OF MODE IN_FILE AND THAT IF " &
52
                      "NO FILE IS SPECIFIED THE CURRENT DEFAULT " &
53
                      "INPUT FILE IS USED");
54
 
55
     DECLARE
56
          FT : FILE_TYPE;
57
          FT2: FILE_TYPE;
58
          TYPE NI IS NEW INTEGER RANGE 1 .. 700;
59
          X : NI;
60
          PACKAGE IIO IS NEW INTEGER_IO (NI);
61
          USE IIO;
62
     BEGIN
63
 
64
-- CREATE AND INITIALIZE DATA FILES
65
 
66
          BEGIN
67
               CREATE (FT, OUT_FILE, LEGAL_FILE_NAME);
68
          EXCEPTION
69
               WHEN USE_ERROR =>
70
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT " &
71
                                    "CREATE WITH OUT_FILE MODE");
72
                    RAISE INCOMPLETE;
73
               WHEN NAME_ERROR =>
74
                    NOT_APPLICABLE ("NAME_ERROR RAISED; TEXT " &
75
                                    "CREATE WITH OUT_FILE MODE");
76
                    RAISE INCOMPLETE;
77
          END;
78
 
79
          PUT (FT, '3');
80
          PUT (FT, '6');
81
          PUT (FT, '9');
82
 
83
          CLOSE (FT);
84
 
85
          BEGIN
86
               OPEN (FT, IN_FILE, LEGAL_FILE_NAME);
87
          EXCEPTION
88
               WHEN USE_ERROR =>
89
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT OPEN " &
90
                                    "WITH IN_FILE MODE");
91
                    RAISE INCOMPLETE;
92
          END;
93
 
94
          CREATE (FT2, OUT_FILE, LEGAL_FILE_NAME(2));
95
 
96
          PUT (FT2, '6');
97
          PUT (FT2, '2');
98
          PUT (FT2, '4');
99
 
100
          CLOSE (FT2);
101
          OPEN (FT2, IN_FILE, LEGAL_FILE_NAME(2));
102
 
103
          SET_INPUT (FT2);
104
 
105
          GET (FT, X);
106
 
107
          IF X /= 369 THEN
108
               FAILED ("GET RETURNED WRONG VALUE; VALUE WAS" &
109
                       NI'IMAGE(X));
110
          END IF;
111
 
112
          GET (X);
113
 
114
          IF X /= 624 THEN
115
               FAILED ("GET FOR DEFAULT WAS WRONG; VALUE WAS" &
116
                       NI'IMAGE(X));
117
          END IF;
118
 
119
          BEGIN
120
               DELETE (FT);
121
               DELETE (FT2);
122
          EXCEPTION
123
               WHEN USE_ERROR =>
124
                    NULL;
125
          END;
126
 
127
     EXCEPTION
128
          WHEN INCOMPLETE =>
129
               NULL;
130
     END;
131
 
132
     RESULT;
133
 
134
END CE3704A;

powered by: WebSVN 2.1.0

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