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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C41324A.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) MAY BE SELECTED FROM OUTSIDE THE
27
-- PACKAGE USING AN EXPANDED NAME, FOR A FIXED POINT TYPE.
28
 
29
-- TBN  7/16/86
30
 
31
WITH REPORT; USE REPORT;
32
PROCEDURE C41324A IS
33
 
34
     PACKAGE P IS
35
          TYPE FIXED IS DELTA 0.125 RANGE -1.0E1 .. 1.0E1;
36
          OBJ_FIX_1 : FIXED := -5.5;
37
          OBJ_FIX_2 : FIXED := 1.5;
38
          OBJ_FIX_3 : FIXED := 10.0;
39
     END P;
40
 
41
     FIX_VAR : P.FIXED;
42
     FIX_VAR_1 : P.FIXED := P."-"(P.FIXED'(5.5));
43
     FIX_VAR_2 : P.FIXED := P.FIXED'(1.5);
44
     FIX_VAR_3 : P.FIXED := P.FIXED'(1.0E1);
45
 
46
BEGIN
47
     TEST ("C41324A", "CHECK THAT IMPLICITLY DECLARED RELATIONAL " &
48
                      "OPERATORS AND ARITHMETIC OPERATORS (+, -, *, " &
49
                      "/, ABS) MAY BE SELECTED FROM OUTSIDE THE " &
50
                      "PACKAGE USING AN EXPANDED NAME, FOR A FIXED " &
51
                      "POINT TYPE");
52
 
53
     IF P."=" (FIX_VAR_1, P."-"(P.FIXED'(6.0))) THEN
54
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 1");
55
     END IF;
56
 
57
     IF P."/=" (FIX_VAR_1, P.OBJ_FIX_1) THEN
58
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 2");
59
     END IF;
60
 
61
     IF P."<" (FIX_VAR_2, P.OBJ_FIX_1) THEN
62
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 3");
63
     END IF;
64
 
65
     IF P.">" (FIX_VAR_2, P.OBJ_FIX_3) THEN
66
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 4");
67
     END IF;
68
 
69
     IF P."<=" (FIX_VAR_3, P.FIXED'(9.9)) THEN
70
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 5");
71
     END IF;
72
 
73
     IF P."<=" (FIX_VAR_3, P.FIXED'(10.0)) THEN
74
          NULL;
75
     ELSE
76
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 6");
77
     END IF;
78
 
79
     IF P.">=" (P.OBJ_FIX_2, FIX_VAR_3) THEN
80
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 7");
81
     END IF;
82
 
83
     IF P.">=" (P.OBJ_FIX_2, FIX_VAR_2) THEN
84
          NULL;
85
     ELSE
86
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 8");
87
     END IF;
88
 
89
     FIX_VAR := P."+" (FIX_VAR_1, P.OBJ_FIX_2);
90
     IF P."/=" (FIX_VAR, P."-"(P.FIXED'(4.0))) THEN
91
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 9");
92
     END IF;
93
 
94
     FIX_VAR := P."-" (FIX_VAR_2, P.OBJ_FIX_1);
95
     IF P."/=" (FIX_VAR, P.FIXED'(7.0)) THEN
96
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 10");
97
     END IF;
98
 
99
     FIX_VAR := P."*" (FIX_VAR_2, 2);
100
     IF P."/=" (FIX_VAR, P.FIXED'(3.0)) THEN
101
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 11");
102
     END IF;
103
 
104
     FIX_VAR := P."*" (3, FIX_VAR_2);
105
     IF P."/=" (FIX_VAR, P.FIXED'(4.5)) THEN
106
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 12");
107
     END IF;
108
 
109
     FIX_VAR := P."/" (FIX_VAR_3, 2);
110
     IF P."/=" (FIX_VAR, P.FIXED'(5.0)) THEN
111
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 13");
112
     END IF;
113
 
114
     FIX_VAR := P."ABS" (FIX_VAR_1);
115
     IF P."/=" (FIX_VAR, P.FIXED'(5.5)) THEN
116
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 14");
117
     END IF;
118
 
119
     RESULT;
120
END C41324A;

powered by: WebSVN 2.1.0

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