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/] [ce3905b.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
-- CE3905B.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 GET FOR ENUMERATION TYPES RAISE MODE_ERROR WHEN THE
27
--     MODE OF THE FILE SPECIFIED IS OUT_FILE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
31
--     SUPPORT CREATE FOR TEMP FILES WITH OUT_FILE.
32
 
33
-- HISTORY:
34
--     SPS 10/07/82
35
--     JBG 02/22/84  CHANGED TO .ADA TEST.
36
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
37
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
38
--     DWC 09/16/87  CORRECTED EXCEPTION HANDLING.
39
 
40
WITH REPORT;
41
USE REPORT;
42
WITH TEXT_IO;
43
USE TEXT_IO;
44
 
45
PROCEDURE CE3905B IS
46
     INCOMPLETE : EXCEPTION;
47
 
48
BEGIN
49
 
50
     TEST ("CE3905B", "CHECK THAT ENUMERATION_IO GET RAISES " &
51
                      "MODE_ERROR WHEN THE MODE OF THE FILE IS " &
52
                      "OUT_FILE");
53
 
54
     DECLARE
55
          FT : FILE_TYPE;
56
          TYPE COLOR IS (RED, BLUE, GREEN, YELLOW);
57
          X : COLOR;
58
          PACKAGE COLOR_IO IS NEW ENUMERATION_IO (COLOR);
59
          USE COLOR_IO;
60
     BEGIN
61
 
62
          BEGIN
63
               CREATE (FT, OUT_FILE);
64
          EXCEPTION
65
               WHEN USE_ERROR =>
66
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
67
                                    "FOR TEMP FILES WITH OUT_FILE " &
68
                                    "MODE");
69
                    RAISE INCOMPLETE;
70
          END;
71
 
72
          BEGIN
73
               GET (FT, X);
74
               FAILED ("MODE_ERROR NOT RAISED - FILE");
75
          EXCEPTION
76
               WHEN MODE_ERROR =>
77
                    NULL;
78
               WHEN OTHERS =>
79
                    FAILED ("WRONG EXCEPTION RAISED - FILE");
80
          END;
81
 
82
          BEGIN
83
               GET (STANDARD_OUTPUT, X);
84
               FAILED ("MODE_ERROR NOT RAISED - STANDARD_OUTPUT");
85
          EXCEPTION
86
               WHEN MODE_ERROR =>
87
                    NULL;
88
               WHEN OTHERS =>
89
                    FAILED ("WRONG EXCEPTION RAISED - STANDARD_OUTPUT");
90
          END;
91
 
92
          BEGIN
93
               GET (CURRENT_OUTPUT, X);
94
               FAILED ("MODE_ERROR NOT RAISED - CURRENT_OUTPUT");
95
          EXCEPTION
96
               WHEN MODE_ERROR =>
97
                    NULL;
98
               WHEN OTHERS =>
99
                    FAILED ("WRONG EXCEPTION RAISED - CURRENT_OUTPUT");
100
          END;
101
 
102
          CLOSE (FT);
103
 
104
     EXCEPTION
105
          WHEN INCOMPLETE =>
106
               NULL;
107
     END;
108
 
109
     RESULT;
110
 
111
END CE3905B;

powered by: WebSVN 2.1.0

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