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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3605A.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 FOR CHARACTER AND STRING PARAMETERS DOES NOT
27
--     UPDATE THE LINE NUMBER WHEN THE LINE LENGTH IS UNBOUNDED,
28
--     ONLY THE COLUMN NUMBER.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
32
--     CREATION OF TEMPORARY TEXT FILES WITH OUT_FILE MODE.
33
 
34
-- HISTORY:
35
--     SPS 09/02/82
36
--     JBG 02/22/84  CHANGED TO .ADA TEST
37
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
38
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
39
--     JLH 09/08/87  CORRECTED EXCEPTION HANDLING AND ADDED CHECKS
40
--                   FOR COLUMN NUMBER.
41
--     RJW 03/28/90  REVISED NUMERIC LITERALS USED IN LOOPS.
42
 
43
WITH REPORT;
44
USE REPORT;
45
WITH TEXT_IO;
46
USE TEXT_IO;
47
 
48
PROCEDURE CE3605A IS
49
     INCOMPLETE : EXCEPTION;
50
 
51
BEGIN
52
 
53
     TEST ("CE3605A", "CHECK THAT PUT FOR CHARACTER AND STRING " &
54
                      "PARAMETERS DOES NOT UPDATE THE LINE NUMBER " &
55
                      "WHEN THE LINE LENGTH IS UNBOUNDED, ONLY THE " &
56
                      "COLUMN NUMBER");
57
 
58
     DECLARE
59
          FILE1 : FILE_TYPE;
60
          LN : POSITIVE_COUNT := 1;
61
     BEGIN
62
 
63
          BEGIN
64
               CREATE (FILE1);
65
          EXCEPTION
66
               WHEN USE_ERROR =>
67
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
68
                                    "FOR TEMPORARY FILES WITH " &
69
                                    "OUT_FILE MODE");
70
                    RAISE INCOMPLETE;
71
          END;
72
 
73
          LN := LINE (FILE1);
74
 
75
          IF LN /= 1 THEN
76
               FAILED ("CURRENT LINE NUMBER NOT INITIALLY ONE");
77
          END IF;
78
 
79
          IF COL (FILE1) /= 1 THEN
80
               FAILED ("CURRENT COLUMN NUMBER NOT INITIALLY ONE");
81
          END IF;
82
 
83
          FOR I IN 1 .. IDENT_INT(240) LOOP
84
               PUT(FILE1, 'A');
85
          END LOOP;
86
          IF LINE (FILE1) /= LN THEN
87
               FAILED ("PUT ALTERED LINE NUMBER - CHARACTER");
88
          END IF;
89
 
90
          IF COL(FILE1) /= 241 THEN
91
               FAILED ("COLUMN NUMBER NOT UPDATED CORRECTLY - 1");
92
          END IF;
93
 
94
          NEW_LINE(FILE1);
95
          LN := LINE (FILE1);
96
 
97
          FOR I IN 1 .. IDENT_INT(40) LOOP
98
               PUT (FILE1, "STRING");
99
          END LOOP;
100
          IF LN /= LINE (FILE1) THEN
101
               FAILED ("PUT ALTERED LINE NUMBER - STRING");
102
          END IF;
103
 
104
          IF COL(FILE1) /= 241 THEN
105
               FAILED ("COLUMN NUMBER NOT UPDATED CORRECTLY - 2");
106
          END IF;
107
 
108
          CLOSE (FILE1);
109
 
110
     EXCEPTION
111
          WHEN INCOMPLETE =>
112
               NULL;
113
 
114
     END;
115
 
116
     RESULT;
117
 
118
END CE3605A;

powered by: WebSVN 2.1.0

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