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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- EE3412C.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 OPERATES ON THE CURRENT DEFAULT OUTPUT FILE WHEN
27
--     NO FILE IS SPECIFIED.  CHECK THAT LINE CAN OPERATE ON FILES OF
28
--     MODE 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
-- PASS/FAIL CRITERIA:
36
--     THIS TEST IS PASSED IF IT EXECUTES, PRINTS TENTATIVELY PASSED,
37
--     AND THE CONTENTS OF THE STANDARD OUTPUT FILE ARE CORRECT.
38
 
39
-- HISTORY:
40
--     SPS 09/29/82
41
--     JBG 08/30/83
42
--     JLH 09/02/87  REMOVED DEPENDENCE ON RESET, REMOVED UNNECESSARY
43
--                   CODE, CHECKED FOR USE_ERROR ON DELETE, AND RENAMED
44
--                   FROM CE3412C.ADA.
45
 
46
WITH REPORT;
47
USE REPORT;
48
WITH TEXT_IO;
49
USE TEXT_IO;
50
 
51
PROCEDURE EE3412C IS
52
     INCOMPLETE : EXCEPTION;
53
 
54
BEGIN
55
 
56
     TEST ("EE3412C", "CHECK THAT LINE OPERATES ON DEFAULT IN_FILE " &
57
                      "AND OUT_FILE FILES");
58
 
59
     DECLARE
60
          F1, F2 : FILE_TYPE;
61
          C : POSITIVE_COUNT;
62
          X : CHARACTER;
63
          ITEM : STRING (1..6);
64
     BEGIN
65
          C := LINE (STANDARD_OUTPUT);
66
          NEW_LINE (STANDARD_OUTPUT);
67
          SPECIAL_ACTION ("ONE BLANK LINE SHOULD PRECEDE THIS COMMENT");
68
          IF LINE /= C+2 THEN
69
               FAILED ("DEFAULT FOR LINE NOT STANDARD_OUTPUT");
70
          END IF;
71
 
72
          BEGIN
73
               CREATE (F1, OUT_FILE, LEGAL_FILE_NAME);
74
          EXCEPTION
75
               WHEN USE_ERROR =>
76
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
77
                                    "WITH OUT_FILE MODE");
78
                    RAISE INCOMPLETE;
79
               WHEN NAME_ERROR =>
80
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT " &
81
                                    "CREATE WITH OUT_FILE MODE");
82
                    RAISE INCOMPLETE;
83
          END;
84
 
85
          CREATE (F2, OUT_FILE);
86
 
87
          SET_OUTPUT (F2);
88
 
89
          FOR I IN 1 .. 6 LOOP
90
               PUT (F1, "STRING");
91
               NEW_LINE (F1);
92
          END LOOP;
93
          IF LINE (F1) /= 7 THEN
94
               FAILED ("LINE INCORRECT SUBTEST 1");
95
          END IF;
96
 
97
          SET_LINE_LENGTH (3);
98
          PUT ("OUTPUT STRING");
99
          IF LINE /= LINE(F2) THEN
100
               FAILED ("LINE INCORRECT SUBTEST 2");
101
          END IF;
102
 
103
          CLOSE (F1);
104
 
105
          BEGIN
106
               OPEN (F1, IN_FILE, LEGAL_FILE_NAME);
107
          EXCEPTION
108
               WHEN USE_ERROR =>
109
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN " &
110
                                    "WITH IN_FILE MODE");
111
                    RAISE INCOMPLETE;
112
          END;
113
 
114
          SET_INPUT (F1);
115
 
116
          GET (F1, ITEM);
117
          IF ITEM /= "STRING" THEN
118
               FAILED ("INCORRECT VALUE READ");
119
          END IF;
120
 
121
          SKIP_LINE(F1);
122
          SKIP_LINE(F1);
123
          SKIP_LINE(F1);
124
          IF LINE (CURRENT_INPUT) /= 4 AND LINE (F1) /= 4 THEN
125
               FAILED ("LINE INCORRECT SUBTEST 3");
126
          END IF;
127
 
128
          BEGIN
129
               DELETE (F1);
130
          EXCEPTION
131
               WHEN USE_ERROR =>
132
                    NULL;
133
          END;
134
 
135
          CLOSE (F2);
136
 
137
     EXCEPTION
138
          WHEN INCOMPLETE =>
139
               NULL;
140
     END;
141
 
142
     RESULT;
143
 
144
END EE3412C;

powered by: WebSVN 2.1.0

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