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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3413A.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 RETURNS THE VALUE OF THE CURRENT PAGE NUMBER.
27
 
28
-- APPLICABILITY CRITERIA:
29
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
30
--     TEXT FILES.
31
 
32
-- HISTORY:
33
--     SPS 09/29/82
34
--     JBG 08/30/83
35
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
36
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
37
--     JLH 09/04/87  REMOVED DEPENDENCE ON RESET AND CHECKED FOR
38
--                   USE_ERROR ON DELETE.
39
 
40
 
41
WITH REPORT;
42
USE REPORT;
43
WITH TEXT_IO;
44
USE TEXT_IO;
45
 
46
PROCEDURE CE3413A IS
47
     INCOMPLETE : EXCEPTION;
48
 
49
BEGIN
50
 
51
     TEST ("CE3413A", "CHECK THAT PAGE RETURNS THE CORRECT PAGE " &
52
                      "NUMBER");
53
 
54
     DECLARE
55
          FT : FILE_TYPE;
56
          X : CHARACTER;
57
     BEGIN
58
 
59
          BEGIN
60
               CREATE (FT, OUT_FILE, LEGAL_FILE_NAME);
61
          EXCEPTION
62
               WHEN USE_ERROR =>
63
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE " &
64
                                    "WITH OUT_FILE MODE");
65
                    RAISE INCOMPLETE;
66
               WHEN NAME_ERROR =>
67
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT " &
68
                                    "CREATE WITH OUT_FILE MODE");
69
                    RAISE INCOMPLETE;
70
               WHEN OTHERS =>
71
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON " &
72
                            "TEXT CREATE");
73
                    RAISE INCOMPLETE;
74
          END;
75
 
76
          IF PAGE (FT) /= 1 THEN
77
               FAILED ("CURRENT PAGE NOT INITIALLY ONE");
78
          END IF;
79
 
80
          FOR I IN 1 .. 6 LOOP
81
               PUT (FT, "OUTPUT STRING");
82
               NEW_PAGE (FT);
83
          END LOOP;
84
          IF PAGE (FT) /= 7 THEN
85
               FAILED ("PAGE INCORRECT AFTER PUT; IS" &
86
                       COUNT'IMAGE(PAGE(FT)));
87
          END IF;
88
 
89
          CLOSE (FT);
90
 
91
          BEGIN
92
               OPEN (FT, IN_FILE, LEGAL_FILE_NAME);
93
          EXCEPTION
94
               WHEN USE_ERROR =>
95
                    NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN " &
96
                                    "WITH IN_FILE MODE");
97
                    RAISE INCOMPLETE;
98
          END;
99
 
100
          IF PAGE (FT) /= 1 THEN
101
               FAILED ("PAGE INCORRECT AFTER OPEN IS" &
102
                       COUNT'IMAGE(PAGE(FT)));
103
          END IF;
104
 
105
          FOR I IN 1 .. 4 LOOP
106
               SKIP_PAGE (FT);
107
          END LOOP;
108
          IF PAGE (FT) /= 5 THEN
109
               FAILED ("PAGE INCORRECT AFTER SKIP_PAGE; IS" &
110
                       COUNT'IMAGE(PAGE(FT)));
111
          END IF;
112
 
113
          BEGIN
114
               DELETE (FT);
115
          EXCEPTION
116
               WHEN USE_ERROR =>
117
                    NULL;
118
          END;
119
 
120
     EXCEPTION
121
          WHEN INCOMPLETE =>
122
               NULL;
123
 
124
     END;
125
 
126
     RESULT;
127
 
128
END CE3413A;

powered by: WebSVN 2.1.0

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