OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c41322a.ada] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
-- C41322A.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 IMPLICITLY DECLARED RELATIONAL OPERATORS AND ARITHMETIC
26
-- OPERATORS (+, -, *, /, **, ABS, MOD, REM) MAY BE SELECTED FROM
27
-- OUTSIDE THE PACKAGE USING AN EXPANDED NAME, FOR AN INTEGER TYPE.
28
 
29
-- TBN  7/16/86
30
 
31
WITH REPORT; USE REPORT;
32
PROCEDURE C41322A IS
33
 
34
     PACKAGE P IS
35
          TYPE INT IS RANGE -10 .. 10;
36
          OBJ_INT_1 : INT := -10;
37
          OBJ_INT_2 : INT := 1;
38
          OBJ_INT_3 : INT := 10;
39
     END P;
40
 
41
     INT_VAR : P.INT;
42
     INT_VAR_1 : P.INT := P."-"(P.INT'(10));
43
     INT_VAR_2 : P.INT := P.INT'(1);
44
     INT_VAR_3 : P.INT := P.INT'(10);
45
 
46
BEGIN
47
     TEST ("C41322A", "CHECK THAT IMPLICITLY DECLARED RELATIONAL " &
48
                      "OPERATORS AND ARITHMETIC OPERATORS (+, -, *, " &
49
                      "/, **, ABS, MOD, REM) MAY BE SELECTED FROM " &
50
                      "OUTSIDE THE PACKAGE USING AN EXPANDED NAME, " &
51
                      "FOR AN INTEGER TYPE");
52
 
53
     IF P."=" (INT_VAR_1, P.INT'(2)) THEN
54
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 1");
55
     END IF;
56
 
57
     IF P."/=" (INT_VAR_1, P.OBJ_INT_1) THEN
58
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 2");
59
     END IF;
60
 
61
     IF P."<" (INT_VAR_2, 0) THEN
62
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 3");
63
     END IF;
64
 
65
     IF P.">" (INT_VAR_2, P.OBJ_INT_3) THEN
66
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 4");
67
     END IF;
68
 
69
     IF P."<=" (INT_VAR_3, P.INT'(9)) THEN
70
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 5");
71
     END IF;
72
 
73
     FOR J IN P.INT'(4) .. P.INT'(4) LOOP
74
          IF P.">=" (J, INT_VAR_3) THEN
75
               FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 6");
76
          END IF;
77
     END LOOP;
78
 
79
     INT_VAR := P."+" (INT_VAR_1, P.INT'(2));
80
     IF P."/=" (INT_VAR, P."-"(P.INT'(8))) THEN
81
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 7");
82
     END IF;
83
 
84
     INT_VAR := P."+" (P.INT'(2));
85
     IF P."/=" (INT_VAR, P.INT'(2)) THEN
86
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 8");
87
     END IF;
88
 
89
     INT_VAR := P."-" (INT_VAR_2, P.INT'(0));
90
     IF P."/=" (INT_VAR, P.OBJ_INT_2) THEN
91
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 9");
92
     END IF;
93
 
94
     INT_VAR := P."*" (INT_VAR_2, P.INT'(5));
95
     IF P."/=" (INT_VAR, P.INT'(5)) THEN
96
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 10");
97
     END IF;
98
 
99
     INT_VAR := P."/" (INT_VAR_3, P.INT'(2));
100
     IF P."/=" (INT_VAR, P.INT'(5)) THEN
101
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 11");
102
     END IF;
103
 
104
     INT_VAR := P."**" (P.INT'(2), 3);
105
     IF P."/=" (INT_VAR, P.INT'(8)) THEN
106
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 12");
107
     END IF;
108
 
109
     INT_VAR := P."ABS" (INT_VAR_1);
110
     IF P."/=" (INT_VAR, P.OBJ_INT_3) THEN
111
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 13");
112
     END IF;
113
 
114
     INT_VAR := P."MOD" (INT_VAR_1, P.INT'(3));
115
     IF P."/=" (INT_VAR, P.INT'(2)) THEN
116
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 14");
117
     END IF;
118
 
119
     INT_VAR := P."REM" (INT_VAR_1, P.INT'(3));
120
     IF P."/=" (INT_VAR, P."-" (INT_VAR_2)) THEN
121
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 15");
122
     END IF;
123
 
124
     RESULT;
125
END C41322A;

powered by: WebSVN 2.1.0

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