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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3403C.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 SKIP_LINE SETS THE CURRENT COLUMN NUMBER TO ONE,
27
--     AND THAT IT IS PERFORMED SPACING TIMES.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
31
--     SUPPORT TEXT FILES.
32
 
33
-- HISTORY:
34
--     ABW 08/26/82
35
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
36
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
37
--     DWC 09/08/87  REVISED EXCEPTION HANDLING, REMOVED
38
--                   DEPENDENCE ON RESET, AND ADDED NEW CASES.
39
--     GJD 11/15/95  FIXED ADA 95 INCOMPATIBLE USE OF CHARACTER LITERALS.
40
 
41
WITH REPORT;
42
USE REPORT;
43
WITH TEXT_IO;
44
USE TEXT_IO;
45
 
46
PROCEDURE CE3403C IS
47
 
48
     INCOMPLETE : EXCEPTION;
49
     FILE : FILE_TYPE;
50
     ONE : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(1));
51
     SPAC3 : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(3));
52
     FOUR : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(4));
53
     CH: CHARACTER;
54
 
55
BEGIN
56
 
57
     TEST ("CE3403C" , "CHECK THAT SKIP_LINE SETS THE CURRENT " &
58
                       "COLUMN NUMBER TO ONE, AND THAT IT IS " &
59
                       "PERFORMED SPACING TIMES");
60
 
61
     BEGIN
62
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
63
     EXCEPTION
64
          WHEN USE_ERROR =>
65
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
66
                               "WITH OUT_FILE MODE");
67
               RAISE INCOMPLETE;
68
          WHEN NAME_ERROR =>
69
               NOT_APPLICABLE ("NAME_ERROR RAISED; TEXT CREATE " &
70
                               "WITH OUT_FILE MODE");
71
               RAISE INCOMPLETE;
72
          WHEN OTHERS =>
73
               FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT CREATE");
74
               RAISE INCOMPLETE;
75
     END;
76
 
77
     FOR I IN CHARACTER RANGE 'A' .. 'E' LOOP
78
          FOR J IN 1 .. 3 LOOP
79
               PUT (FILE, I);
80
          END LOOP;
81
          NEW_LINE (FILE);
82
     END LOOP;
83
 
84
     CLOSE (FILE);
85
 
86
     BEGIN
87
           OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
88
     EXCEPTION
89
          WHEN USE_ERROR =>
90
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT OPEN " &
91
                               "FOR IN_FILE MODE");
92
               RAISE INCOMPLETE;
93
     END;
94
 
95
     IF COL (FILE) /= ONE THEN
96
          FAILED ("COLUMN NOT SET TO ONE");
97
     END IF;
98
 
99
     GET (FILE, CH);
100
 
101
     IF CH /= 'A' THEN
102
          FAILED ("INCORRECT VALUE READ - 1");
103
     END IF;
104
 
105
     SKIP_LINE (FILE,SPAC3);
106
     GET (FILE, CH);
107
 
108
     IF CH /= 'D' THEN
109
          FAILED ("INCORRECT VALUE READ - 2");
110
     END IF;
111
 
112
     IF LINE (FILE) /= FOUR THEN
113
          FAILED ("NOT PERFORMED SPACING TIMES");
114
     END IF;
115
 
116
     RESULT;
117
 
118
EXCEPTION
119
     WHEN INCOMPLETE =>
120
          RESULT;
121
 
122
END CE3403C;

powered by: WebSVN 2.1.0

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