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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce3410e.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3410E.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 SET_LINE RAISES END_ERROR IF NO PAGE BEFORE THE END
27
--     OF THE FILE IS LONG ENOUGH.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES.
32
 
33
-- HISTORY:
34
--     ABW 08/26/82
35
--     SPS 09/20/82
36
--     JBG 01/27/83
37
--     JBG 08/30/83
38
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
39
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
40
--     JLH 09/02/87  REMOVED DEPENDENCE ON RESET, ADDED NEW CASES FOR
41
--                   OBJECTIVE, AND CHECKED FOR USE_ERROR ON DELETE.
42
 
43
WITH REPORT;
44
USE REPORT;
45
WITH TEXT_IO;
46
USE TEXT_IO;
47
 
48
PROCEDURE CE3410E IS
49
 
50
     INCOMPLETE : EXCEPTION;
51
     FILE : FILE_TYPE;
52
     CHAR : CHARACTER := ('C');
53
     ITEM_CHAR : CHARACTER;
54
     FIVE : POSITIVE_COUNT := POSITIVE_COUNT (IDENT_INT(5));
55
 
56
BEGIN
57
 
58
     TEST ("CE3410E", "CHECK THAT SET_LINE RAISES END_ERROR " &
59
                      "WHEN IT ATTEMPTS TO READ THE FILE TERMINATOR");
60
 
61
-- CREATE & INITIALIZE FILE
62
 
63
     BEGIN
64
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
65
     EXCEPTION
66
          WHEN USE_ERROR =>
67
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE WITH " &
68
                               "MODE OUT_FILE");
69
               RAISE INCOMPLETE;
70
          WHEN NAME_ERROR =>
71
               NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT CREATE " &
72
                               "WITH MODE OUT_FILE");
73
               RAISE INCOMPLETE;
74
          WHEN OTHERS =>
75
               FAILED ("UNEXPECTED EXCEPTION RAISED ON TEXT CREATE");
76
               RAISE INCOMPLETE;
77
     END;
78
 
79
     PUT (FILE, "ABCD");
80
     NEW_LINE (FILE);
81
     PUT (FILE, "DEF");
82
     NEW_LINE (FILE, 3);
83
     NEW_PAGE (FILE);
84
     PUT_LINE (FILE, "HELLO");
85
     NEW_PAGE (FILE);
86
     PUT_LINE (FILE, "GH");
87
     PUT_LINE (FILE, "IJK");
88
     PUT_LINE (FILE, "HI");
89
     PUT_LINE (FILE, "TESTING");
90
 
91
     CLOSE (FILE);
92
 
93
     BEGIN
94
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
95
     EXCEPTION
96
          WHEN USE_ERROR =>
97
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN WITH " &
98
                               "MODE IN_FILE");
99
               RAISE INCOMPLETE;
100
     END;
101
 
102
     BEGIN
103
          SET_LINE (FILE,FIVE);
104
          FAILED ("END ERROR NOT RAISED ON SET_LINE");
105
     EXCEPTION
106
          WHEN END_ERROR =>
107
               NULL;
108
          WHEN OTHERS =>
109
               FAILED ("UNEXPECTED EXCEPTION RAISED ON SET_LINE");
110
     END;
111
 
112
     BEGIN
113
          DELETE (FILE);
114
     EXCEPTION
115
          WHEN USE_ERROR =>
116
               NULL;
117
     END;
118
 
119
     RESULT;
120
 
121
EXCEPTION
122
     WHEN INCOMPLETE =>
123
          RESULT;
124
 
125
END CE3410E;

powered by: WebSVN 2.1.0

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