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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C43106A.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
-- OBJECTIVE:
26
--     CHECK THAT BOTH NAMED AND POSITIONAL NOTATIONS ARE PERMITTED
27
--     WITHIN THE SAME RECORD AGGREGATE, (PROVIDED THAT ALL POSITIONAL
28
--     ASSOCIATIONS APPEAR BEFORE ANY NAMED ASSOCIATION).
29
 
30
-- HISTORY:
31
--     DHH 08/10/88 CREATED ORIGIANL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
PROCEDURE C43106A IS
35
 
36
     TYPE REC IS
37
          RECORD
38
               A : INTEGER;
39
               B : CHARACTER;
40
               C : BOOLEAN;
41
               D, E, F, G : INTEGER;
42
               H, I, J, K : CHARACTER;
43
               L, M, N, O : BOOLEAN;
44
               P, Q, R, S : STRING(1 .. 3);
45
               T, U, V, W, X, Y, Z : BOOLEAN;
46
          END RECORD;
47
     AGG : REC := (12, 'A', TRUE, 1, 2, 3, 4, 'B', 'C', 'D', 'E',
48
                   P|R => "ABC", S|Q => "DEF", L|X|O|U => TRUE,
49
                   OTHERS => FALSE);
50
 
51
     FUNCTION IDENT_CHAR(X : CHARACTER) RETURN CHARACTER IS
52
     BEGIN
53
          IF EQUAL(3, 3) THEN
54
               RETURN X;
55
          ELSE
56
               RETURN 'Z';
57
          END IF;
58
     END IDENT_CHAR;
59
 
60
BEGIN
61
     TEST("C43106A", "CHECK THAT BOTH NAMED AND POSITIONAL NOTATIONS " &
62
                     "ARE PERMITTED WITHIN THE SAME RECORD " &
63
                     "AGGREGATE, (PROVIDED THAT ALL POSITIONAL " &
64
                     "ASSOCIATIONS APPEAR BEFORE ANY NAMED " &
65
                     "ASSOCIATION)");
66
 
67
     IF NOT IDENT_BOOL(AGG.C) OR NOT IDENT_BOOL(AGG.L) OR
68
        NOT IDENT_BOOL(AGG.X) OR NOT IDENT_BOOL(AGG.O) OR
69
        NOT IDENT_BOOL(AGG.U) OR IDENT_BOOL(AGG.M) OR
70
            IDENT_BOOL(AGG.N) OR IDENT_BOOL(AGG.T) OR
71
            IDENT_BOOL(AGG.V) OR IDENT_BOOL(AGG.W) OR
72
            IDENT_BOOL(AGG.Y) OR IDENT_BOOL(AGG.Z) THEN
73
          FAILED("BOOLEANS NOT INITIALIZED TO AGGREGATE VALUES");
74
     END IF;
75
 
76
     IF IDENT_STR(AGG.P) /= IDENT_STR(AGG.R) OR
77
        IDENT_STR(AGG.Q) /= IDENT_STR(AGG.S) THEN
78
          FAILED("STRINGS NOT INITIALIZED CORRECTLY");
79
     END IF;
80
 
81
     IF IDENT_CHAR(AGG.B) /= IDENT_CHAR('A') OR
82
        IDENT_CHAR(AGG.H) /= IDENT_CHAR('B') OR
83
        IDENT_CHAR(AGG.I) /= IDENT_CHAR('C') OR
84
        IDENT_CHAR(AGG.J) /= IDENT_CHAR('D') OR
85
        IDENT_CHAR(AGG.K) /= IDENT_CHAR('E') THEN
86
          FAILED("CHARACTERS NOT INITIALIZED CORRECTLY");
87
     END IF;
88
 
89
     RESULT;
90
END C43106A;

powered by: WebSVN 2.1.0

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