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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3405D.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 NEW_PAGE INCREMENTS THE CURRENT PAGE NUMBER AND
27
--     SETS THE CURRENT COLUMN AND LINE NUMBERS TO ONE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
31
--     SUPPORT TEXT FILES.
32
 
33
-- HISTORY:
34
--     SPS 08/28/82
35
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
36
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
37
--     DWC 09/23/87  CORRECTED EXCEPTION HANDLING AND ADDED CASES FOR
38
--                   CONSECUTIVE NEW_LINE AND NEW_PAGE.
39
 
40
WITH REPORT;
41
USE REPORT;
42
WITH TEXT_IO;
43
USE TEXT_IO;
44
WITH CHECK_FILE;
45
 
46
PROCEDURE CE3405D IS
47
     INCOMPLETE : EXCEPTION;
48
BEGIN
49
 
50
     TEST ("CE3405D", "CHECK THAT NEW_PAGE INCREMENTS PAGE COUNT " &
51
                      "AND SETS COLUMN AND LINE TO ONE");
52
 
53
     DECLARE
54
          FT : FILE_TYPE;
55
          CH : CHARACTER;
56
          PG_NUM : POSITIVE_COUNT;
57
     BEGIN
58
 
59
          BEGIN
60
               CREATE (FT, OUT_FILE);
61
          EXCEPTION
62
               WHEN USE_ERROR =>
63
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
64
                                    "FOR TEMP FILE WITH OUT_FILE " &
65
                                    "MODE");
66
                    RAISE INCOMPLETE;
67
               WHEN OTHERS =>
68
                    FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT CREATE");
69
                    RAISE INCOMPLETE;
70
          END;
71
 
72
          PUT (FT, "STRING");
73
          NEW_LINE (FT);
74
          PUT (FT, 'X');
75
          PG_NUM := PAGE (FT);
76
 
77
          NEW_PAGE (FT);
78
 
79
          IF COL(FT) /= 1 THEN
80
               FAILED ("COLUMN NUMBER NOT RESET - OUTPUT - 1");
81
          END IF;
82
          IF LINE (FT) /= 1 THEN
83
               FAILED ("LINE NUMBER NOT RESET - OUTPUT - 1");
84
          END IF;
85
          IF PAGE (FT) /= PG_NUM + 1 THEN
86
               FAILED ("PAGE NUMBER NOT INCREMENTED - OUTPUT - 1");
87
          END IF;
88
 
89
          PUT (FT, "MORE STUFF");
90
          NEW_LINE (FT);
91
          NEW_PAGE (FT);
92
 
93
          IF COL(FT) /= 1 THEN
94
               FAILED ("COLUMN NUMBER NOT RESET - OUTPUT - 2");
95
          END IF;
96
          IF LINE (FT) /= 1 THEN
97
               FAILED ("LINE NUMBER NOT RESET - OUTPUT - 2");
98
          END IF;
99
          IF PAGE (FT) /= PG_NUM + 2 THEN
100
               FAILED ("PAGE NUMBER NOT INCREMENTED - OUTPUT - 2");
101
          END IF;
102
 
103
          CHECK_FILE (FT, "STRING#X#@MORE STUFF#@%");
104
 
105
          CLOSE (FT);
106
 
107
     EXCEPTION
108
          WHEN INCOMPLETE =>
109
               NULL;
110
     END;
111
 
112
     RESULT;
113
 
114
END CE3405D;

powered by: WebSVN 2.1.0

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