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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C45345B.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  CONSTRAINT_ERROR  IS NOT RAISED IF THE RESULT OF
26
--     CATENATION HAS PRECISELY THE MAXIMUM LENGTH PERMITTED BY THE
27
--     INDEX SUBTYPE.
28
 
29
 
30
-- RM  2/26/82
31
 
32
 
33
WITH REPORT;
34
USE REPORT;
35
PROCEDURE C45345B IS
36
 
37
 
38
BEGIN
39
 
40
     TEST ( "C45345B" , "CHECK THAT  CONSTRAINT_ERROR  IS NOT RAISED" &
41
                        " IF THE RESULT OF CATENATION HAS PRECISELY" &
42
                        " THE MAXIMUM LENGTH PERMITTED BY THE" &
43
                        " INDEX SUBTYPE" );
44
 
45
 
46
     -------------------------------------------------------------------
47
     -----------------  STRG_VAR := STRG_LIT & STRG_LIT  ---------------
48
 
49
     DECLARE
50
 
51
          X : STRING(1..5) ;
52
 
53
     BEGIN
54
 
55
          X := "ABCD" & "E" ;
56
 
57
     EXCEPTION
58
 
59
          WHEN  CONSTRAINT_ERROR =>
60
               FAILED( "'STRING & STRING' RAISED  CONSTRAINT_ERROR " );
61
 
62
          WHEN  OTHERS =>
63
               FAILED( "'STRING & STRING' RAISED ANOTHER EXCEPTION" );
64
 
65
     END;
66
 
67
 
68
     -------------------------------------------------------------------
69
     -----------------  STRG_VAR := STRG_LIT & CHARACTER  --------------
70
 
71
     DECLARE
72
 
73
          X : STRING(1..5) ;
74
 
75
     BEGIN
76
 
77
          X := "ABCD" & 'E' ;
78
 
79
     EXCEPTION
80
 
81
          WHEN  CONSTRAINT_ERROR =>
82
               FAILED( "'STRING & STRING' RAISED  CONSTRAINT_ERROR " );
83
 
84
          WHEN  OTHERS =>
85
               FAILED( "'STRING & STRING' RAISED ANOTHER EXCEPTION" );
86
 
87
     END;
88
 
89
     -------------------------------------------------------------------
90
     -----------------  STRG_VAR := STRG_VAR & STRG_VAR  ---------------
91
 
92
     DECLARE
93
 
94
          X :          STRING(1..5) ;
95
          A : CONSTANT STRING       := "A" ;
96
          B :          STRING(1..4) := IDENT_STR("BCDE") ;
97
 
98
     BEGIN
99
 
100
          X :=  A & B ;
101
 
102
     EXCEPTION
103
 
104
          WHEN  CONSTRAINT_ERROR =>
105
               FAILED( "'STRING & STRING' RAISED  CONSTRAINT_ERROR " );
106
 
107
          WHEN  OTHERS =>
108
               FAILED( "'STRING & STRING' RAISED ANOTHER EXCEPTION" );
109
 
110
     END;
111
 
112
     -------------------------------------------------------------------
113
 
114
 
115
     RESULT;
116
 
117
 
118
END C45345B;

powered by: WebSVN 2.1.0

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