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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3605B.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 PUT OUTPUTS A LINE TERMINATOR, RESETS THE COLUMN
27
--     NUMBER AND INCREMENTS THE LINE NUMBER WHEN THE LINE LENGTH IS
28
--     BOUNDED AND THE COLUMN NUMBER EQUALS THE LINE LENGTH WHEN PUT
29
--     IS CALLED.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     TEXT FILES.
34
 
35
-- HISTORY:
36
--     SPS 09/02/82
37
--     JBG 12/28/82
38
--     JBG 02/22/84  CHANGED TO .ADA TEST
39
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
40
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
41
--     JLH 09/08/87  GAVE FILE A NAME AND REMOVED CODE WHICH RESETS
42
--                   THE FILE.
43
 
44
WITH REPORT; USE REPORT;
45
WITH TEXT_IO; USE TEXT_IO;
46
PROCEDURE CE3605B IS
47
     INCOMPLETE : EXCEPTION;
48
 
49
BEGIN
50
 
51
     TEST ("CE3605B", "CHECK THAT PUT PROPERLY MAINTAINS THE " &
52
                      "LINE NUMBER AND COLUMN NUMBER WHEN THE " &
53
                      "LINE LENGTH IS BOUNDED");
54
 
55
     DECLARE
56
          FILE1 : FILE_TYPE;
57
          LN_CNT : POSITIVE_COUNT;
58
     BEGIN
59
 
60
          BEGIN
61
               CREATE (FILE1, OUT_FILE, LEGAL_FILE_NAME);
62
          EXCEPTION
63
               WHEN USE_ERROR =>
64
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
65
                                    "WITH OUT_FILE MODE");
66
                    RAISE INCOMPLETE;
67
               WHEN NAME_ERROR =>
68
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT " &
69
                                    "CREATE WITH OUT_FILE MODE");
70
                    RAISE INCOMPLETE;
71
               WHEN OTHERS =>
72
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON " &
73
                            "TEXT CREATE");
74
                    RAISE INCOMPLETE;
75
          END;
76
 
77
          SET_LINE_LENGTH (FILE1, 5);
78
          LN_CNT := LINE (FILE1);
79
 
80
          FOR I IN 1 .. 5 LOOP
81
               PUT (FILE1, 'X');
82
          END LOOP;
83
 
84
          IF COL(FILE1) /= 6 THEN
85
               FAILED ("COLUMN NUMBER NOT INCREMENTED - PUT; " &
86
                       "VALUE WAS" & COUNT'IMAGE(COL(FILE1)));
87
          END IF;
88
 
89
          IF LINE(FILE1) /= LN_CNT THEN
90
               FAILED ("LINE COUNT MODIFIED - PUT CHARACTER; " &
91
                       "VALUE WAS" & COUNT'IMAGE(LINE(FILE1)));
92
          END IF;
93
 
94
          PUT (FILE1, 'X');
95
          IF COL(FILE1) /= 2 THEN
96
               FAILED ("COLUMN NUMBER NOT RESET - PUT CHARACTER; " &
97
                       "VALUE WAS" & COUNT'IMAGE(COL(FILE1)));
98
          END IF;
99
 
100
          IF LINE(FILE1) /= LN_CNT + 1 THEN
101
               FAILED("LINE NUMBER NOT INCREMENTED - PUT CHARACTER; " &
102
                       "VALUE WAS" & COUNT'IMAGE(LINE(FILE1)));
103
          END IF;
104
 
105
          NEW_LINE (FILE1);
106
 
107
          SET_LINE_LENGTH (FILE1, 4);
108
          LN_CNT := LINE (FILE1);
109
 
110
          PUT (FILE1, "XXXX");
111
 
112
          IF COL(FILE1) /= 5 THEN
113
               FAILED ("COLUMN NUMBER NOT INCREMENTED - PUT STRING; " &
114
                       "VALUE WAS" & COUNT'IMAGE(COL(FILE1)));
115
          END IF;
116
 
117
          IF LINE (FILE1) /= LN_CNT THEN
118
               FAILED ("LINE NUMBER INCREMENTED - PUT STRING; " &
119
                       "VALUE WAS" & COUNT'IMAGE(LINE (FILE1)));
120
          END IF;
121
 
122
          PUT (FILE1, "STR");
123
 
124
          IF COL(FILE1) /= 4 THEN
125
               FAILED ("COLUMN NUMBER NOT SET CORRECTLY - PUT" &
126
                       "STRING; VALUE WAS" & COUNT'IMAGE(COL(FILE1)));
127
          END IF;
128
 
129
          IF LINE (FILE1) /= LN_CNT + 1 THEN
130
               FAILED ("LINE NUMBER NOT INCREMENTED - PUT STRING; " &
131
                       "VALUE WAS" & COUNT'IMAGE(LINE (FILE1)));
132
          END IF;
133
 
134
     EXCEPTION
135
          WHEN INCOMPLETE =>
136
               NULL;
137
 
138
     END;
139
 
140
     RESULT;
141
 
142
END CE3605B;

powered by: WebSVN 2.1.0

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