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

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

Line No. Rev Author Line
1 149 jeremybenn
-- CE3402D.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_LINE SETS THE CURRENT COLUMN NUMBER TO ONE,
27
--     AND NEW_LINE OUTPUTS LINE TERMINATORS WHEN THE SPACING IS
28
--     GREATER THAN ONE.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
32
--     CREATE WITH OUT_FILE MODE FOR TEXT FILES.
33
 
34
-- HISTORY:
35
--     ABW 08/26/82
36
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
37
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
38
--     DWC 08/19/87  CHANGED FAILED MESSAGE.
39
 
40
WITH REPORT;
41
USE REPORT;
42
WITH TEXT_IO;
43
USE TEXT_IO;
44
 
45
PROCEDURE CE3402D IS
46
 
47
     INCOMPLETE : EXCEPTION;
48
     FILE : FILE_TYPE;
49
     ONE : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(1));
50
     SPAC3 : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(3));
51
     FOUR : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(4));
52
 
53
BEGIN
54
 
55
     TEST ("CE3402D",  "CHECK THAT NEW_LINE SETS THE CURRENT " &
56
                       "COLUMN NUMBER TO ONE, AND NEW_LINE OUTPUTS " &
57
                       "TERMINATORS WHEN THE SPACING IS " &
58
                       "GREATER THAN ONE");
59
 
60
     BEGIN
61
          CREATE (FILE);
62
     EXCEPTION
63
          WHEN USE_ERROR =>
64
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
65
                               "WITH OUT_FILE MODE");
66
               RAISE INCOMPLETE;
67
          WHEN OTHERS =>
68
               FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT CREATE");
69
               RAISE INCOMPLETE;
70
     END;
71
 
72
     FOR I IN 1..5 LOOP
73
          PUT (FILE, 'X');
74
     END LOOP;
75
 
76
     NEW_LINE (FILE, SPAC3);
77
     IF LINE (FILE) /= FOUR THEN
78
          FAILED ("NEW_LINE DID NOT OUTPUT LINE TERMINATORS");
79
     END IF;
80
 
81
     IF COL (FILE) /= ONE THEN
82
          FAILED ("COLUMN NOT SET TO ONE");
83
     END IF;
84
     CLOSE (FILE);
85
 
86
     RESULT;
87
 
88
EXCEPTION
89
     WHEN INCOMPLETE =>
90
          RESULT;
91
 
92
END CE3402D;

powered by: WebSVN 2.1.0

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