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/] [ce3906a.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
-- CE3906A.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 PUT FOR ENUMERATION TYPES CAN OPERATE ON FILES OF
27
--     MODE OUT_FILE AND THAT WHEN NO FILE PARAMETER IS SPECIFIED
28
--     THE CURRENT DEFAULT OUTPUT FILE IS USED.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
32
--     TEMPORARY TEXT FILES.
33
 
34
-- HISTORY:
35
--     SPS 10/08/82
36
--     SPS 01/03/83
37
--     SPS 02/18/83
38
--     JBG 02/22/84  CHANGED TO .ADA TEST.
39
--     TBN 11/10/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
40
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
41
--     DWC 09/17/87  REMOVED UNNECESSARY CODE AND CORRECTED EXCEPTION
42
--                   HANDLING.
43
 
44
WITH REPORT;
45
USE REPORT;
46
WITH TEXT_IO;
47
USE TEXT_IO;
48
WITH CHECK_FILE;
49
 
50
PROCEDURE CE3906A IS
51
     INCOMPLETE : EXCEPTION;
52
 
53
BEGIN
54
 
55
     TEST ("CE3906A", "CHECK THAT PUT FOR ENUMERATION TYPES CAN " &
56
                      "OPERATE ON FILES OF MODE OUT_FILE AND THAT " &
57
                      "WHEN NO FILE PARAMETER IS SPECIFIED THE " &
58
                      "CURRENT DEFAULT OUTPUT FILE IS USED. CHECK " &
59
                      "THAT ENUMERATION_IO PUT OPERATES ON OUT_FILE " &
60
                      "FILES");
61
 
62
     DECLARE
63
          FT1, FT2 : FILE_TYPE;
64
          TYPE COLOR IS (ROSE, VANILLA, CHARCOAL, CHOCOLATE);
65
          CRAYON : COLOR := ROSE;
66
          PACKAGE COLOR_IO IS NEW ENUMERATION_IO (COLOR);
67
          USE COLOR_IO;
68
     BEGIN
69
 
70
          BEGIN
71
               CREATE (FT1, OUT_FILE);
72
          EXCEPTION
73
               WHEN USE_ERROR =>
74
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
75
                                    "FOR TEMP FILES WITH OUT_FILE " &
76
                                    "MODE - 1");
77
                    RAISE INCOMPLETE;
78
          END;
79
 
80
          CREATE (FT2, OUT_FILE);
81
 
82
          SET_OUTPUT (FT2);
83
 
84
          PUT (FT1, CRAYON);
85
          NEW_LINE (FT1);
86
          PUT (FT1, CHOCOLATE);
87
 
88
          CRAYON := CHARCOAL;
89
 
90
          PUT (CRAYON);
91
          NEW_LINE;
92
          PUT (VANILLA);
93
 
94
-- CHECK OUTPUT
95
 
96
          SET_OUTPUT (STANDARD_OUTPUT);
97
          COMMENT ("CHECKING FT1");
98
          CHECK_FILE (FT1, "ROSE#CHOCOLATE#@%");
99
 
100
          COMMENT ("CHECKING FT2");
101
          CHECK_FILE (FT2, "CHARCOAL#VANILLA#@%");
102
 
103
     EXCEPTION
104
          WHEN INCOMPLETE =>
105
               NULL;
106
     END;
107
 
108
     RESULT;
109
 
110
END CE3906A;

powered by: WebSVN 2.1.0

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