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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3406A.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 SKIP_PAGE READS AND DISCARDS CHARACTERS AND LINE
27
--     TERMINATORS UNTIL A PAGE TERMINATOR IS READ, ADDS ONE TO THE
28
--     CURRENT PAGE NUMBER, AND SETS THE CURRENT COLUMN NUMBER AND LINE
29
--     NUMBER TO ONE.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     TEXT FILES.
34
 
35
-- HISTORY:
36
--     ABW 08/26/82
37
--     SPS 09/17/82
38
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
39
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
40
--     JLH 09/24/87  CREATED NON-TEMPORARY FILE, REMOVED DEPENDENCE
41
--                   ON RESET, AND CHECKED FOR USE_ERROR ON DELETE.
42
 
43
WITH REPORT;
44
USE REPORT;
45
WITH TEXT_IO;
46
USE TEXT_IO;
47
 
48
PROCEDURE CE3406A IS
49
 
50
     INCOMPLETE : EXCEPTION;
51
     FILE : FILE_TYPE;
52
     CHAR_X : CHARACTER := ('X');
53
     ITEM_CHAR : CHARACTER;
54
     ONE : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(1));
55
     TWO : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(2));
56
     THREE : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(3));
57
 
58
BEGIN
59
 
60
     TEST ("CE3406A", "CHECK THAT SKIP_LINE READS AND " &
61
                      "SETS PAGE AND COLUMN CORRECTLY");
62
 
63
     BEGIN
64
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
65
     EXCEPTION
66
          WHEN USE_ERROR =>
67
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
68
                               "WITH OUT_FILE MODE");
69
               RAISE INCOMPLETE;
70
          WHEN NAME_ERROR =>
71
               NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT CREATE " &
72
                               "WITH OUT_FILE MODE");
73
               RAISE INCOMPLETE;
74
          WHEN OTHERS =>
75
               FAILED ("UNEXPECTED EXCEPTION RAISED ON TEXT CREATE");
76
               RAISE INCOMPLETE;
77
     END;
78
 
79
     PUT (FILE, "CDE");
80
     NEW_LINE (FILE);
81
     PUT (FILE, "FGHI");
82
     NEW_LINE (FILE);
83
     PUT (FILE, "JK");
84
     NEW_PAGE (FILE);
85
     NEW_PAGE (FILE);
86
     PUT (FILE,CHAR_X);
87
 
88
     CLOSE (FILE);
89
 
90
     BEGIN
91
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
92
     EXCEPTION
93
          WHEN USE_ERROR =>
94
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN WITH " &
95
                               "IN_FILE MODE");
96
               RAISE INCOMPLETE;
97
     END;
98
 
99
     IF (LINE (FILE) /= ONE) THEN
100
          FAILED ("LINE NUMBER NOT EQUAL TO ONE");
101
     END IF;
102
 
103
     IF (PAGE (FILE) /= ONE) THEN
104
          FAILED ("PAGE NUMBER NOT EQUAL TO ONE");
105
     END IF;
106
 
107
     GET (FILE, ITEM_CHAR);
108
 
109
     IF ITEM_CHAR /= 'C' THEN
110
          FAILED ("INCORRECT VALUE READ FROM FILE - 1");
111
     END IF;
112
 
113
     SKIP_PAGE (FILE);
114
 
115
     IF COL (FILE) /= ONE THEN
116
          FAILED ("COLUMN NOT SET TO ONE - 1");
117
     END IF;
118
 
119
     IF LINE (FILE) /= ONE THEN
120
          FAILED ("LINE NOT SET TO ONE - 1");
121
     END IF;
122
 
123
     IF PAGE (FILE) /= TWO THEN
124
          FAILED ("PAGE NOT SET TO TWO");
125
     END IF;
126
 
127
     SKIP_PAGE (FILE);
128
 
129
     IF COL (FILE) /= ONE THEN
130
          FAILED ("COLUMN NOT SET TO ONE - 2");
131
     END IF;
132
 
133
     IF LINE (FILE) /= ONE THEN
134
          FAILED ("LINE NOT SET TO ONE - 2");
135
     END IF;
136
 
137
     IF PAGE (FILE) /= THREE THEN
138
          FAILED ("PAGE NOT SET TO THREE");
139
     END IF;
140
 
141
     GET (FILE, ITEM_CHAR);
142
     IF ITEM_CHAR /= 'X' THEN
143
          FAILED ("INCORRECT VALUE READ FROM FILE - 2");
144
     END IF;
145
 
146
     BEGIN
147
          DELETE (FILE);
148
     EXCEPTION
149
          WHEN USE_ERROR =>
150
               NULL;
151
     END;
152
 
153
     RESULT;
154
 
155
EXCEPTION
156
     WHEN INCOMPLETE =>
157
          RESULT;
158
 
159
END CE3406A;

powered by: WebSVN 2.1.0

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