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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C52103B.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 LENGTHS MUST MATCH IN ARRAY AND SLICE ASSIGNMENTS.
26
--    MORE SPECIFICALLY, TEST THAT ARRAY ASSIGNMENTS WITH MATCHING
27
--    LENGTHS DO NOT CAUSE  CONSTRAINT_ERROR  TO BE RAISED AND
28
--    ARE PERFORMED CORRECTLY.
29
--    (OVERLAPS BETWEEN THE OPERANDS OF THE ASSIGNMENT STATEMENT
30
--    ARE TREATED ELSEWHERE.)
31
 
32
-- THIS IS THE SECOND FILE IN
33
--    DIVISION  A : STATICALLY-DETERMINABLE NON-NULL LENGTHS.
34
 
35
 
36
-- RM 07/20/81
37
-- SPS 2/18/83
38
 
39
WITH REPORT;
40
PROCEDURE  C52103B  IS
41
 
42
     USE  REPORT ;
43
 
44
BEGIN
45
 
46
     TEST( "C52103B" , "CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE" &
47
                       " ASSIGNMENTS  THE LENGTHS MUST MATCH" );
48
 
49
 
50
     --                              ( EACH DIVISION COMPRISES 3 FILES,
51
     --                                COVERING RESPECTIVELY THE FIRST
52
     --                                3 , NEXT 2 , AND LAST 3 OF THE 8
53
     --                                SELECTIONS FOR THE DIVISION.)
54
 
55
 
56
     -------------------------------------------------------------------
57
 
58
     --   (13) UNSLICED ONE-DIMENSIONAL ARRAY OBJECTS WHOSE TYPEMARKS
59
     --        WERE DEFINED USING THE "BOX" SYMBOL
60
     --        AND FOR WHICH THE COMPONENT TYPE IS  'CHARACTER' .
61
 
62
     DECLARE
63
 
64
          TYPE  TABOX3  IS  ARRAY( INTEGER RANGE <> )  OF CHARACTER ;
65
 
66
          ARRX31  :  TABOX3( 11..15 );
67
 
68
     BEGIN
69
 
70
 
71
          -- ARRAY ASSIGNMENT (WITH STRING AGGREGATE):
72
 
73
          ARRX31 :=  "QUINC" ; -- "QUINC"(1..5)  SLIDES TO 11..15
74
 
75
 
76
          -- CHECKING THE VALUES AFTER THE ASSIGNMENT:
77
 
78
          IF  ARRX31           /=  "QUINC"  OR
79
              ARRX31( 11..15 ) /=  "QUINC"
80
          THEN
81
               FAILED( "ARRAY ASSIGNMENT NOT CORRECT (13)" );
82
          END IF;
83
 
84
     EXCEPTION
85
 
86
          WHEN  OTHERS  =>
87
               FAILED( "EXCEPTION RAISED  -  SUBTEST 13" );
88
 
89
     END ;
90
 
91
 
92
     -------------------------------------------------------------------
93
 
94
     --    (6) SLICED ONE-DIMENSIONAL ARRAY OBJECTS WHOSE TYPEMARKS
95
     --        WERE DEFINED WITHOUT EVER USING THE "BOX" SYMBOL
96
     --        AND FOR WHICH THE COMPONENT TYPE IS  'CHARACTER' .
97
     --
98
 
99
     DECLARE
100
 
101
          TYPE  TA61  IS  ARRAY( INTEGER RANGE 11..15 )  OF CHARACTER ;
102
 
103
          ARR61  :  TA61 ;
104
 
105
     BEGIN
106
 
107
          -- INITIALIZATION OF UNUSED COMPONENT OF LHS ARRAY:
108
 
109
          ARR61( 11..11 )  :=  "Q"  ;
110
 
111
 
112
          -- SLICE ASSIGNMENT:
113
 
114
          ARR61( 12..15 ) :=  "UINC" ; -- "UINC"(1..4)  SLIDES TO 12..15
115
 
116
 
117
          -- CHECKING THE VALUES AFTER THE SLICE ASSIGNMENT:
118
 
119
          IF  ARR61           /=  "QUINC"  OR
120
              ARR61( 11..15 ) /=  "QUINC"
121
          THEN
122
               FAILED( "SLICE ASSIGNMENT NOT CORRECT (6)" );
123
          END IF;
124
 
125
     EXCEPTION
126
 
127
          WHEN  OTHERS  =>
128
               FAILED( "EXCEPTION RAISED  -  SUBTEST 6" );
129
 
130
     END ;
131
 
132
 
133
     -------------------------------------------------------------------
134
 
135
 
136
     RESULT ;
137
 
138
 
139
END C52103B;

powered by: WebSVN 2.1.0

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