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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3906F.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 THE SET PARAMETER AFFECTS THE CASE OF IDENTIFIERS,
27
--     BUT NOT CHARACTER LITERALS.  CHECK THAT CHARACTER LITERALS ARE
28
--     ENCLOSED IN APOSTROPHES.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH
32
--     SUPPORT TEXT FILES.
33
 
34
-- HISTORY:
35
--     JBG 12/30/82
36
--     VKG 01/12/83
37
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
38
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
39
--     DWC 09/18/87  CORRECTED EXCEPTION HANDLING.
40
 
41
WITH TEXT_IO; USE TEXT_IO;
42
WITH REPORT; USE REPORT;
43
WITH CHECK_FILE;
44
 
45
PROCEDURE CE3906F IS
46
 
47
     TYPE ENUM IS (REDISH,GREENISH,YELLOWISH);
48
     PACKAGE ENUM_IO IS NEW ENUMERATION_IO(ENUM);
49
     PACKAGE CHAR_IO IS NEW ENUMERATION_IO(CHARACTER);
50
     USE ENUM_IO; USE CHAR_IO;
51
     INCOMPLETE : EXCEPTION;
52
     FT : FILE_TYPE;
53
 
54
BEGIN
55
 
56
     TEST ("CE3906F", "CHECK THE CASE OF ENUMERATION IO OUTPUT");
57
 
58
     BEGIN
59
          CREATE (FT);
60
      EXCEPTION
61
          WHEN USE_ERROR =>
62
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT " &
63
                               "CREATE FOR TEMP FILE WITH " &
64
                               "OUT_FILE MODE - 1");
65
               RAISE INCOMPLETE;
66
     END;
67
 
68
     IF ENUM_IO.DEFAULT_WIDTH /= 0 THEN
69
          FAILED ("INITIAL DEFAULT WIDTH INCORRECT");
70
     END IF;
71
 
72
     IF CHAR_IO.DEFAULT_SETTING /= UPPER_CASE THEN
73
          FAILED ("INITIAL DEFAULT_SETTING INCORRECT");
74
     END IF;
75
 
76
     PUT (FT, 'A', SET => LOWER_CASE);
77
     NEW_LINE (FT);
78
     PUT (FT, 'a', SET => LOWER_CASE);
79
     NEW_LINE (FT);
80
     PUT (FT, REDISH, SET => LOWER_CASE);
81
     NEW_LINE (FT);
82
     ENUM_IO.DEFAULT_SETTING := LOWER_CASE;
83
     CHAR_IO.PUT (FT, 'C');
84
     NEW_LINE  (FT);
85
     CHAR_IO.PUT (FT, 'b');
86
     NEW_LINE (FT);
87
     PUT (FT, REDISH);
88
     NEW_LINE (FT);
89
     PUT (FT, GREENISH, SET => LOWER_CASE);
90
     NEW_LINE (FT);
91
     PUT (FT, YELLOWISH, SET => UPPER_CASE);
92
 
93
     CHECK_FILE (FT, "'A'#'a'#redish#'C'#'b'#redish#greenish#"
94
                   & "YELLOWISH#@%");
95
 
96
     RESULT;
97
 
98
EXCEPTION
99
     WHEN INCOMPLETE =>
100
          RESULT;
101
 
102
END CE3906F;

powered by: WebSVN 2.1.0

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