OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c45264c.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C45264C.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 COMPARING ARRAYS OF DIFFERENT LENGTHS DOES NOT RAISE AN
26
-- EXCEPTION.
27
 
28
-- TBN  7/21/86
29
 
30
WITH REPORT; USE REPORT;
31
PROCEDURE C45264C IS
32
 
33
     SUBTYPE INT IS INTEGER RANGE 1 .. 10;
34
     TYPE ARRAY_TYPE_1 IS ARRAY (INT RANGE <>) OF INTEGER;
35
     TYPE ARRAY_TYPE_2 IS ARRAY (INT RANGE <>, INT RANGE <>) OF INTEGER;
36
     TYPE ARRAY_TYPE_3 IS ARRAY (INT RANGE <>, INT RANGE <>,
37
                                               INT RANGE <>) OF INTEGER;
38
 
39
     ARRAY_1 : ARRAY_TYPE_1 (1..5) := (1..5 => 1);
40
     ARRAY_2 : ARRAY_TYPE_1 (1..7) := (1..7 => 1);
41
     ARRAY_3 : ARRAY_TYPE_2 (1..5, 1..4) := (1..5 => (1..4 => 1));
42
     ARRAY_4 : ARRAY_TYPE_2 (1..2, 1..3) := (1..2 => (1..3 => 1));
43
     ARRAY_5 : ARRAY_TYPE_3 (1..2, 1..3, 1..2) := (1..2 => (1..3 =>
44
                                                  (1..2 => 2)));
45
     ARRAY_6 : ARRAY_TYPE_3 (1..1, 1..2, 1..3) := (1..1 => (1..2 =>
46
                                                  (1..3 => 2)));
47
     ARRAY_7 : ARRAY_TYPE_2 (1..5, 1..4) := (1..5 => (1..4 => 3));
48
     ARRAY_8 : ARRAY_TYPE_2 (1..5, 1..3) := (1..5 => (1..3 => 3));
49
     ARRAY_9 : ARRAY_TYPE_2 (1..3, 1..2) := (1..3 => (1..2 => 4));
50
     ARRAY_10 : ARRAY_TYPE_2 (1..2, 1..2) := (1..2 => (1..2 => 4));
51
 
52
BEGIN
53
     TEST ("C45264C", "CHECK THAT COMPARING ARRAYS OF DIFFERENT " &
54
                      "LENGTHS DOES NOT RAISE AN EXCEPTION");
55
 
56
     BEGIN     -- (A)
57
          IF "=" (ARRAY_1 (1..INTEGER'FIRST), ARRAY_2) THEN
58
               FAILED ("INCORRECT RESULTS FROM COMPARING ONE " &
59
                       "DIMENSIONAL ARRAYS - 1");
60
          END IF;
61
 
62
     EXCEPTION
63
          WHEN OTHERS =>
64
               FAILED ("EXCEPTION RAISED EVALUATING - 1");
65
     END;     -- (A)
66
 
67
     BEGIN     -- (B)
68
          IF ARRAY_1 /= ARRAY_2 THEN
69
               NULL;
70
          ELSE
71
               FAILED ("INCORRECT RESULTS FROM COMPARING ONE " &
72
                       "DIMENSIONAL ARRAYS - 2");
73
          END IF;
74
 
75
     EXCEPTION
76
          WHEN OTHERS =>
77
               FAILED ("EXCEPTION RAISED EVALUATING - 2");
78
     END;     -- (B)
79
 
80
     BEGIN     -- (C)
81
          IF ARRAY_3 = ARRAY_4 THEN
82
               FAILED ("INCORRECT RESULTS FROM COMPARING MULTI-" &
83
                       "DIMENSIONAL ARRAYS - 3");
84
          END IF;
85
 
86
     EXCEPTION
87
          WHEN OTHERS =>
88
               FAILED ("EXCEPTION RAISED EVALUATING - 3");
89
     END;     -- (C)
90
 
91
     BEGIN     -- (D)
92
          IF "/=" (ARRAY_3, ARRAY_4) THEN
93
               NULL;
94
          ELSE
95
               FAILED ("INCORRECT RESULTS FROM COMPARING MULT-" &
96
                       "DIMENSIONAL ARRAYS - 4");
97
          END IF;
98
 
99
     EXCEPTION
100
          WHEN OTHERS =>
101
               FAILED ("EXCEPTION RAISED - 4");
102
     END;     -- (D)
103
 
104
     BEGIN     -- (E)
105
          IF "=" (ARRAY_5, ARRAY_6) THEN
106
               FAILED ("INCORRECT RESULTS FROM COMPARING MULTI-" &
107
                       "DIMENSIONAL ARRAYS - 5");
108
          END IF;
109
 
110
     EXCEPTION
111
          WHEN OTHERS =>
112
               FAILED ("EXCEPTION RAISED EVALUATING - 5");
113
     END;     -- (E)
114
 
115
     BEGIN     -- (F)
116
          IF ARRAY_6 /= ARRAY_5 THEN
117
               NULL;
118
          ELSE
119
               FAILED ("INCORRECT RESULTS FROM COMPARING MULT-" &
120
                       "DIMENSIONAL ARRAYS - 6");
121
          END IF;
122
 
123
     EXCEPTION
124
          WHEN OTHERS =>
125
               FAILED ("EXCEPTION RAISED - 6");
126
     END;     -- (F)
127
 
128
     BEGIN     -- (G)
129
          IF ARRAY_7 = ARRAY_8 THEN
130
               FAILED ("INCORRECT RESULTS FROM COMPARING MULTI-" &
131
                       "DIMENSIONAL ARRAYS - 7");
132
          END IF;
133
 
134
     EXCEPTION
135
          WHEN OTHERS =>
136
               FAILED ("EXCEPTION RAISED EVALUATING - 7");
137
     END;     -- (G)
138
 
139
     BEGIN     -- (H)
140
          IF ARRAY_9 /= ARRAY_10 THEN
141
               NULL;
142
          ELSE
143
               FAILED ("INCORRECT RESULTS FROM COMPARING MULTI-" &
144
                       "DIMENSIONAL ARRAYS - 8");
145
          END IF;
146
 
147
     EXCEPTION
148
          WHEN OTHERS =>
149
               FAILED ("EXCEPTION RAISED EVALUATING - 8");
150
     END;     -- (H)
151
 
152
     RESULT;
153
END C45264C;

powered by: WebSVN 2.1.0

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