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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C48009F.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
-- FOR ALLOCATORS OF THE FORM "NEW T'(X)", CHECK THAT CONSTRAINT_ERROR
26
-- IS RAISED IF T IS A CONSTRAINED OR UNCONSTRAINED MULTI-DIMENSIONAL
27
-- ARRAY TYPE AND ALL COMPONENTS OF X DO NOT HAVE THE SAME LENGTH OR
28
-- BOUNDS. 
29
 
30
-- RM  01/08/80
31
-- NL  10/13/81
32
-- SPS 10/26/82
33
-- JBG 03/03/83
34
-- EG  07/05/84
35
 
36
WITH REPORT;
37
 
38
PROCEDURE  C48009F  IS
39
 
40
     USE REPORT;
41
 
42
BEGIN
43
 
44
     TEST("C48009F","FOR ALLOCATORS OF THE FORM 'NEW T'(X)', CHECK " &
45
                    "THAT CONSTRAINT_ERROR IS RAISED WHEN "          &
46
                    "X IS AN ILL-FORMED MULTIDIMENSIONAL AGGREGATE");
47
 
48
     DECLARE
49
 
50
          TYPE  TG00  IS  ARRAY( 4..2 ) OF  INTEGER;
51
          TYPE  TG10  IS  ARRAY( 1..2 ) OF  INTEGER;
52
          TYPE  TG20  IS  ARRAY( INTEGER RANGE <> ) OF  INTEGER;
53
 
54
          TYPE  TG0  IS  ARRAY( 3..2 ) OF  TG00;
55
          TYPE  TG1  IS  ARRAY( 1..2 ) OF  TG10;
56
          TYPE  TG2  IS  ARRAY( INTEGER RANGE <> ) OF  TG20(1..3);
57
 
58
          TYPE  ATG0  IS  ACCESS TG0;
59
          TYPE  ATG1  IS  ACCESS TG1;
60
          TYPE  ATG2  IS  ACCESS TG2;
61
 
62
          VG0  : ATG0;
63
          VG1  : ATG1;
64
          VG2  : ATG2;
65
 
66
     BEGIN
67
 
68
          BEGIN
69
               VG0  :=  NEW TG0 '( 5..4 => ( 3..1 => 2 ) );
70
               FAILED ("NO EXCEPTION RAISED - CASE 0");
71
          EXCEPTION
72
               WHEN  CONSTRAINT_ERROR  =>  NULL;
73
               WHEN  OTHERS            =>
74
                    FAILED( "WRONG EXCEPTION RAISED - CASE 0" );
75
          END;
76
 
77
          BEGIN
78
               VG1  :=  NEW TG1 '( ( 1 , 2 ) , ( 3 , 4 , 5 ) );
79
               FAILED ("NO EXCEPTION RAISED - CASE 1");
80
          EXCEPTION
81
               WHEN  CONSTRAINT_ERROR  =>  NULL;
82
               WHEN  OTHERS            =>
83
                    FAILED( "WRONG EXCEPTION RAISED - CASE 1" );
84
          END;
85
 
86
          BEGIN
87
               VG2 := NEW TG2'( 1 => ( 1..2 => 7) , 2 => ( 1..3 => 7));
88
               FAILED ("NO EXCEPTION RAISED - CASE 2");
89
          EXCEPTION
90
               WHEN  CONSTRAINT_ERROR  =>  NULL;
91
               WHEN  OTHERS            =>
92
                    FAILED( "WRONG EXCEPTION RAISED - CASE 2" );
93
          END;
94
 
95
     END;
96
 
97
     RESULT;
98
 
99
END C48009F;

powered by: WebSVN 2.1.0

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