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/] [c4/] [c43205e.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
-- C43205E.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
-- CHECK THAT THE BOUNDS OF A POSITIONAL AGGREGATE ARE DETERMINED
26
-- CORRECTLY. IN PARTICULAR, CHECK THAT THE LOWER BOUND IS GIVEN BY
27
-- 'FIRST OF THE INDEX SUBTYPE WHEN THE POSITIONAL AGGREGATE IS USED AS:
28
 
29
--   E) THE LEFT OR RIGHT OPERAND OF "&".
30
 
31
-- EG  01/26/84
32
 
33
WITH REPORT;
34
 
35
PROCEDURE C43205E IS
36
 
37
     USE REPORT;
38
 
39
BEGIN
40
 
41
     TEST("C43205E", "CASE E : OPERAND OF &");
42
 
43
     BEGIN
44
 
45
CASE_E :  DECLARE
46
 
47
               SUBTYPE STE IS INTEGER RANGE 2 .. 10;
48
 
49
               TYPE COLOR IS (RED, GREEN, BLUE);
50
               TYPE TE IS ARRAY (STE RANGE <>) OF COLOR;
51
 
52
               FUNCTION CONCAT1 RETURN TE IS
53
               BEGIN
54
                    RETURN (RED, GREEN, BLUE) & (7 .. 8 => RED);
55
               END;
56
 
57
               FUNCTION CONCAT2 RETURN TE IS
58
               BEGIN
59
                    RETURN (IDENT_INT(4) .. 3 => RED) & (GREEN, BLUE);
60
               END;
61
 
62
               FUNCTION CONCAT3 RETURN STRING IS
63
               BEGIN
64
                    RETURN "TEST" & (7 .. 8 => 'X');
65
               END;
66
 
67
               FUNCTION CONCAT4 RETURN STRING IS
68
               BEGIN
69
                    RETURN (8 .. 5 => 'A') & "BC";
70
               END;
71
 
72
          BEGIN
73
 
74
               IF CONCAT1'FIRST /= IDENT_INT(2) THEN
75
                    FAILED ("CASE E1 : LOWER BOUND INCORRECTLY " &
76
                            "GIVEN BY 'FIRST");
77
               ELSIF CONCAT1'LAST /= 6 THEN
78
                    FAILED ("CASE E1 : UPPER BOUND INCORRECTLY " &
79
                            "GIVEN BY 'LAST");
80
               ELSIF CONCAT1 /= (RED, GREEN, BLUE, RED, RED) THEN
81
                    FAILED ("CASE E1 : INCORRECT VALUES PRODUCED");
82
               END IF;
83
               IF CONCAT2'FIRST /= IDENT_INT(2) THEN
84
                    FAILED ("CASE E2 : LOWER BOUND INCORRECTLY " &
85
                            "GIVEN BY 'FIRST");
86
               ELSIF CONCAT2'LAST /= 3 THEN
87
                    FAILED ("CASE E2 : UPPER BOUND INCORRECTLY " &
88
                            "GIVEN BY 'LAST");
89
               ELSIF CONCAT2 /= (GREEN, BLUE) THEN
90
                    FAILED ("CASE E2 : INCORRECT VALUES PRODUCED");
91
               END IF;
92
               IF CONCAT3'FIRST /= IDENT_INT(1) THEN
93
                    FAILED ("CASE E3 : LOWER BOUND INCORRECTLY " &
94
                            "GIVEN BY 'FIRST");
95
               ELSIF CONCAT3'LAST /= 6 THEN
96
                    FAILED ("CASE E3 : UPPER BOUND INCORRECTLY " &
97
                            "GIVEN BY 'LAST");
98
               ELSIF CONCAT3 /= "TESTXX" THEN
99
                    FAILED ("CASE E3 : INCORRECT VALUES PRODUCED");
100
               END IF;
101
               IF CONCAT4'FIRST /= IDENT_INT(1) THEN
102
                    FAILED ("CASE E4 : LOWER BOUND INCORRECTLY " &
103
                            "GIVEN BY 'FIRST");
104
               ELSIF CONCAT4'LAST /= 2 THEN
105
                    FAILED ("CASE E4 : UPPER BOUND INCORRECTLY " &
106
                            "GIVEN BY 'LAST");
107
               ELSIF CONCAT4 /= "BC" THEN
108
                    FAILED ("CASE E4 : INCORRECT VALUES PRODUCED");
109
               END IF;
110
 
111
          END CASE_E;
112
 
113
     END;
114
 
115
     RESULT;
116
 
117
END C43205E;

powered by: WebSVN 2.1.0

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