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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3413C.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 PAGE OPERATES ON THE CURRENT DEFAULT OUTPUT FILE WHEN
27
--     NO FILE IS SPECIFIED.  CHECK THAT PAGE CAN OPERATE ON FILES OF
28
--     MODES IN_FILE AND OUT_FILE, INCLUDING THE CURRENT DEFAULT
29
--     INPUT_FILE.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     TEXT FILES.
34
 
35
-- HISTORY:
36
--     SPS 09/29/82
37
--     JBG 08/30/83
38
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
39
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
40
--     JLH 09/04/87  REMOVED DEPENDENCE ON RESET, CORRECTED EXCEPTION
41
--                   HANDLING, AND CHECKED FOR USE_ERROR ON DELETE.
42
 
43
 
44
WITH REPORT;
45
USE REPORT;
46
WITH TEXT_IO;
47
USE TEXT_IO;
48
 
49
PROCEDURE CE3413C IS
50
     INCOMPLETE : EXCEPTION;
51
 
52
BEGIN
53
 
54
     TEST ("CE3413C", "CHECK THAT PAGE OPERATES ON DEFAULT IN_FILE " &
55
                      "AND OUT_FILE FILES");
56
 
57
     DECLARE
58
          F1, F2 : FILE_TYPE;
59
          C : POSITIVE_COUNT;
60
          X : CHARACTER;
61
     BEGIN
62
 
63
          BEGIN
64
               CREATE (F1, 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 " &
72
                                    "CREATE WITH OUT_FILE MODE");
73
                    RAISE INCOMPLETE;
74
               WHEN OTHERS =>
75
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON " &
76
                            "TEXT CREATE");
77
                    RAISE INCOMPLETE;
78
          END;
79
 
80
          BEGIN
81
               CREATE (F2, OUT_FILE);
82
          EXCEPTION
83
               WHEN USE_ERROR =>
84
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
85
                                    "FOR TEMPORARY FILES WITH " &
86
                                    "OUT_FILE MODE");
87
                    RAISE INCOMPLETE;
88
          END;
89
 
90
          SET_OUTPUT (F2);
91
 
92
          IF PAGE (F2) /= 1 AND PAGE (STANDARD_OUTPUT) /= 1 THEN
93
               FAILED ("PAGE INCORRECT SUBTEST - 1");
94
          END IF;
95
 
96
          FOR I IN 1 .. 3 LOOP
97
               PUT (F1, "STRING");
98
               NEW_PAGE (F1);
99
          END LOOP;
100
 
101
          IF PAGE (F1) /= 4 THEN
102
               FAILED ("PAGE INCORRECT SUBTEST - 2");
103
          END IF;
104
 
105
          SET_LINE_LENGTH (F2, 3);
106
          SET_PAGE_LENGTH (F2, 1);
107
          PUT ("OUTPUT STRING");
108
          IF PAGE /= PAGE(F2) THEN
109
               FAILED ("PAGE INCORRECT SUBTEST - 3");
110
          END IF;
111
 
112
          CLOSE (F1);
113
 
114
          BEGIN
115
               OPEN (F1, IN_FILE, LEGAL_FILE_NAME);
116
          EXCEPTION
117
               WHEN USE_ERROR =>
118
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN " &
119
                                    "IN_FILE MODE");
120
                    RAISE INCOMPLETE;
121
          END;
122
 
123
          SET_INPUT (F1);
124
 
125
          IF PAGE (F1) /= 1 THEN
126
               FAILED ("PAGE INCORRECT SUBTEST - 4");
127
          END IF;
128
 
129
          SKIP_PAGE(F1);
130
          SKIP_PAGE(F1);
131
          IF PAGE (F1) /= PAGE (CURRENT_INPUT) THEN
132
               FAILED ("PAGE INCORRECT SUBTEST - 5");
133
          END IF;
134
 
135
          BEGIN
136
               DELETE (F1);
137
          EXCEPTION
138
               WHEN USE_ERROR =>
139
                    NULL;
140
          END;
141
 
142
          CLOSE (F2);
143
 
144
     EXCEPTION
145
          WHEN INCOMPLETE =>
146
               NULL;
147
 
148
     END;
149
 
150
     RESULT;
151
 
152
END CE3413C;

powered by: WebSVN 2.1.0

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