OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce3412a.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- CE3412A.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 LINE RETURNS THE VALUE OF THE CURRENT LINE NUMBER.
27
 
28
-- APPLICABILITY CRITERIA:
29
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
30
--     TEXT FILES.
31
 
32
-- HISTORY:
33
--     SPS 09/29/82
34
--     JBG 08/30/83
35
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
36
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
37
--     JLH 09/02/87  REMOVED DEPENDENCE ON RESET AND CHECKED FOR
38
--                   USE_ERROR ON DELETE.
39
 
40
WITH REPORT;
41
USE REPORT;
42
WITH TEXT_IO;
43
USE TEXT_IO;
44
 
45
PROCEDURE CE3412A IS
46
     INCOMPLETE : EXCEPTION;
47
 
48
BEGIN
49
 
50
     TEST ("CE3412A", "CHECK LINE RETURNS LINE NUMBER");
51
 
52
     DECLARE
53
          FT : FILE_TYPE;
54
          X : CHARACTER;
55
     BEGIN
56
 
57
          BEGIN
58
               CREATE (FT, OUT_FILE, LEGAL_FILE_NAME);
59
          EXCEPTION
60
               WHEN USE_ERROR =>
61
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
62
                                    "WITH OUT_FILE MODE");
63
                    RAISE INCOMPLETE;
64
               WHEN NAME_ERROR =>
65
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT " &
66
                                    "CREATE WITH OUT_FILE MODE");
67
                    RAISE INCOMPLETE;
68
               WHEN OTHERS =>
69
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON TEXT " &
70
                            "CREATE");
71
                    RAISE INCOMPLETE;
72
          END;
73
 
74
          IF LINE (FT) /= 1 THEN
75
               FAILED ("CURRENT LINE NUMBER NOT INITIALLY ONE");
76
          END IF;
77
 
78
          FOR I IN 1 .. 3 LOOP
79
               PUT (FT, "OUTPUT STRING");
80
               NEW_LINE (FT);
81
          END LOOP;
82
          IF LINE (FT) /= 4 THEN
83
               FAILED ("LINE INCORRECT AFTER PUT; IS" &
84
                       COUNT'IMAGE(LINE(FT)));
85
          END IF;
86
 
87
          NEW_PAGE (FT);
88
          IF LINE (FT) /= 1 THEN
89
               FAILED ("LINE INCORRECT AFTER NEW_PAGE; IS" &
90
                       COUNT'IMAGE(LINE(FT)));
91
          END IF;
92
 
93
          FOR I IN 1 .. 5 LOOP
94
               PUT (FT, "MORE OUTPUT");
95
               NEW_LINE(FT);
96
          END LOOP;
97
 
98
          CLOSE (FT);
99
 
100
          BEGIN
101
               OPEN (FT, IN_FILE, LEGAL_FILE_NAME);
102
          EXCEPTION
103
               WHEN USE_ERROR =>
104
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN " &
105
                                    "WITH IN_FILE MODE");
106
                    RAISE INCOMPLETE;
107
          END;
108
 
109
          IF LINE (FT) /= 1 THEN
110
               FAILED ("LINE INCORRECT AFTER RESET; IS" &
111
                       COUNT'IMAGE(LINE(FT)));
112
          END IF;
113
 
114
          FOR I IN 1 .. 2 LOOP
115
               SKIP_LINE (FT);
116
          END LOOP;
117
          IF LINE (FT) /= 3 THEN
118
               FAILED ("LINE INCORRECT AFTER SKIP_LINE; IS" &
119
                       COUNT'IMAGE(LINE(FT)));
120
          END IF;
121
 
122
          SET_LINE (FT, 2);
123
          IF LINE (FT) /= 2 THEN
124
               FAILED ("LINE INCORRECT AFTER SET_LINE; IS" &
125
                       COUNT'IMAGE(LINE(FT)));
126
          END IF;
127
 
128
          SKIP_PAGE (FT);
129
          IF LINE (FT) /= 1 THEN
130
               FAILED ("LINE INCORRECT AFTER SKIP_PAGE; IS" &
131
                       COUNT'IMAGE(LINE(FT)));
132
          END IF;
133
 
134
          BEGIN
135
               DELETE (FT);
136
          EXCEPTION
137
               WHEN USE_ERROR =>
138
                    NULL;
139
          END;
140
 
141
     EXCEPTION
142
          WHEN INCOMPLETE =>
143
               NULL;
144
 
145
     END;
146
 
147
     RESULT;
148
 
149
END CE3412A;

powered by: WebSVN 2.1.0

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