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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3906E.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
-- HISTORY:
26
--     CHECK THAT PUT FOR ENUMERATION TYPES RAISES LAYOUT_ERROR WHEN
27
--     THE NUMBER OF CHARACTERS TO BE OUTPUT EXCEEDS THE MAXIMUM LINE
28
--     LENGTH. CHECK THAT LAYOUT_ERROR IS NOT RAISED WHEN THE NUMBER
29
--     OF CHARACTERS TO BE OUTPUT DOES NOT EXCEED THE MAXIMUM LINE
30
--     LENGTH, BUT WHEN ADDED TO THE CURRENT COLUMN NUMBER, THE TOTAL
31
--     EXCEEDS THE MAXIMUM LINE LENGTH.
32
 
33
-- APPLICABILITY CRITERIA:
34
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMETATIONS WHICH
35
--     SUPPORT TEXT FILES.
36
 
37
-- HISTORY:
38
--     SPS 10/11/82
39
--     JBG 02/22/84  CHANGED TO .ADA TEST
40
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
41
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
42
--     DWC 09/18/87  CORRECTED EXCEPTION HANDLING.
43
 
44
WITH REPORT;
45
USE REPORT;
46
WITH TEXT_IO;
47
USE TEXT_IO;
48
WITH CHECK_FILE;
49
 
50
PROCEDURE CE3906E IS
51
     INCOMPLETE : EXCEPTION;
52
 
53
BEGIN
54
 
55
     TEST ("CE3906E", "CHECK THAT ENUMERATION_IO PUT RAISES " &
56
                      "LAYOUT_ERROR CORRECTLY");
57
 
58
     DECLARE
59
          FT : FILE_TYPE;
60
          TYPE COLOR IS (RED, BLU, YELLOW, ORANGE, RD);
61
          PACKAGE COLOR_IO IS NEW ENUMERATION_IO (COLOR);
62
          USE COLOR_IO;
63
          CRAYON : COLOR := ORANGE;
64
     BEGIN
65
 
66
          BEGIN
67
               CREATE (FT);
68
          EXCEPTION
69
               WHEN USE_ERROR =>
70
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT " &
71
                                    "CREATE FOR TEMP FILES WITH " &
72
                                    "OUT_FILE MODE - 1");
73
                    RAISE INCOMPLETE;
74
          END;
75
 
76
          SET_LINE_LENGTH (FT, 5);
77
 
78
          BEGIN
79
               PUT (FT, CRAYON);
80
               FAILED("LAYOUT_ERROR NOT RAISED");
81
          EXCEPTION
82
               WHEN LAYOUT_ERROR =>
83
                    NULL;
84
               WHEN OTHERS =>
85
                    FAILED ("WRONG EXCEPTION RAISED");
86
          END;
87
 
88
          PUT (FT, RED);
89
 
90
          PUT (FT, BLU);
91
          IF LINE (FT) /= 2 THEN
92
               FAILED ("PUT DID NOT CAUSE NEW_LINE EFFECT");
93
          END IF;
94
 
95
          PUT (FT, RD);
96
 
97
          CHECK_FILE (FT, "RED#" &
98
                          "BLURD#@%");
99
 
100
          CLOSE (FT);
101
 
102
     EXCEPTION
103
          WHEN INCOMPLETE =>
104
               NULL;
105
     END;
106
 
107
     RESULT;
108
 
109
END CE3906E;

powered by: WebSVN 2.1.0

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