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

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

Line No. Rev Author Line
1 149 jeremybenn
-- C45281A.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 EQUALITY AND INEQUALITY ARE EVALUATED CORRECTLY FOR ACCESS
26
-- TYPES.
27
 
28
-- TBN  8/8/86
29
 
30
WITH REPORT; USE REPORT;
31
PROCEDURE C45281A IS
32
 
33
     TYPE STR_NAME IS ACCESS STRING;
34
 
35
     TYPE GENDER IS (F, M);
36
     TYPE PERSON (SEX : GENDER) IS
37
          RECORD
38
               NAME : STRING (1..6) := "NONAME";
39
          END RECORD;
40
 
41
     TYPE PERSON_NAME IS ACCESS PERSON;
42
     SUBTYPE MALE IS PERSON_NAME (M);
43
     SUBTYPE FEMALE IS PERSON_NAME (F);
44
 
45
     S : STR_NAME (1..10) := NEW STRING'("0123456789");
46
     T : STR_NAME (1..10) := S;
47
     A : MALE;
48
     B : FEMALE;
49
     C : PERSON_NAME;
50
 
51
BEGIN
52
     TEST ("C45281A", "CHECK THAT EQUALITY AND INEQUALITY ARE " &
53
                      "EVALUATED CORRECTLY FOR ACCESS TYPES");
54
 
55
     IF "/=" (LEFT => S, RIGHT => T) THEN
56
          FAILED ("INCORRECT RESULTS FOR ACCESS VALUES - 1");
57
     END IF;
58
     T := NEW STRING'("0123456789");
59
     IF "=" (S, T) THEN
60
          FAILED ("INCORRECT RESULTS FOR ACCESS VALUES - 2");
61
     END IF;
62
 
63
     IF A /= B THEN
64
          FAILED ("INCORRECT RESULTS FOR NULL ACCESS VALUES - 3");
65
     END IF;
66
     IF A /= C THEN
67
          FAILED ("INCORRECT RESULTS FOR NULL ACCESS VALUES - 4");
68
     END IF;
69
 
70
     A := NEW PERSON'(M, "THOMAS");
71
     IF "=" (LEFT => A, RIGHT => B) THEN
72
          FAILED ("INCORRECT RESULTS FOR ACCESS VALUES - 5");
73
     END IF;
74
     C := A;
75
     IF C /= A THEN
76
          FAILED ("INCORRECT RESULTS FOR ACCESS VALUES - 6");
77
     END IF;
78
     C := NEW PERSON'(M, "THOMAS");
79
     IF A = C THEN
80
          FAILED ("INCORRECT RESULTS FOR ACCESS VALUES - 7");
81
     END IF;
82
 
83
     RESULT;
84
END C45281A;

powered by: WebSVN 2.1.0

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