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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3410D.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, FOR FILES OF MODE IN_FILE, SET_LINE READS UNTIL A
27
--     PAGE IS FOUND HAVING A LINE AT THE SPECIFIED POSITION, SKIPPING
28
--     LINE AND PAGE TERMINATORS AS NECESSARY.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
32
--     TEXT FILES.
33
 
34
-- HISTORY:
35
--     JBG 01/27/83
36
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NOT_APPLICABLE
37
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
38
--     JLH 09/01/87  REMOVED DEPENDENCE ON RESET AND CHECKED FOR
39
--                   USE_ERROR ON DELETE.
40
--     GJD 11/15/95  FIXED ADA 95 INCOMPATIBLE USE OF CHARACTER LITERALS.
41
 
42
WITH REPORT; USE REPORT;
43
WITH TEXT_IO; USE TEXT_IO;
44
 
45
PROCEDURE CE3410D IS
46
 
47
     INCOMPLETE : EXCEPTION;
48
     FILE : FILE_TYPE;
49
     FOUR : POSITIVE_COUNT := POSITIVE_COUNT (IDENT_INT(4));
50
     ITEM_CHAR : CHARACTER;
51
 
52
BEGIN
53
 
54
     TEST ("CE3410D", "CHECK THAT SET_LINE SKIPS PAGE " &
55
                      "TERMINATORS WHEN NECESSARY");
56
 
57
     BEGIN
58
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
59
     EXCEPTION
60
          WHEN USE_ERROR =>
61
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT CREATE WITH " &
62
                               "MODE OUT_FILE");
63
               RAISE INCOMPLETE;
64
          WHEN NAME_ERROR =>
65
               NOT_APPLICABLE ("NAME_ERROR RAISED ON TEXT CREATE " &
66
                               "WITH MODE OUT_FILE");
67
               RAISE INCOMPLETE;
68
          WHEN OTHERS =>
69
               FAILED ("UNEXPECTED EXCEPTION RAISED ON TEXT CREATE");
70
               RAISE INCOMPLETE;
71
     END;
72
 
73
     FOR I IN CHARACTER RANGE 'A'..'C' LOOP
74
          PUT (FILE, I);
75
          NEW_LINE (FILE);
76
     END LOOP;
77
 
78
     NEW_PAGE (FILE);
79
 
80
     FOR I IN CHARACTER RANGE 'D'..'H'   -- 5 LINES
81
     LOOP
82
          PUT (FILE, I);
83
          NEW_LINE (FILE);
84
     END LOOP;
85
 
86
     CLOSE (FILE);
87
 
88
     BEGIN
89
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
90
     EXCEPTION
91
          WHEN USE_ERROR =>
92
               NOT_APPLICABLE ("USE_ERROR RAISED ON TEXT OPEN WITH " &
93
                               "IN_FILE MODE");
94
               RAISE INCOMPLETE;
95
     END;
96
 
97
     SET_LINE (FILE, FOUR);
98
     GET (FILE, ITEM_CHAR);
99
 
100
     IF ITEM_CHAR /= 'G' THEN
101
          FAILED ("SET_LINE DOESN'T SKIP PAGE MARKS; " &
102
                  "ACTUALLY READ '" & ITEM_CHAR & "'");
103
     END IF;
104
 
105
     BEGIN
106
          DELETE (FILE);
107
     EXCEPTION
108
          WHEN USE_ERROR =>
109
                    NULL;
110
     END;
111
 
112
     RESULT;
113
 
114
EXCEPTION
115
     WHEN INCOMPLETE =>
116
          RESULT;
117
 
118
END CE3410D;

powered by: WebSVN 2.1.0

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