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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c35a07a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C35A07A.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 FOR FIXED POINT TYPES THE FIRST AND LAST ATTRIBUTES YIELD
26
-- CORRECT VALUES.
27
 
28
-- CASE A: BASIC TYPES THAT FIT THE CHARACTERISTICS OF DURATION'BASE.
29
 
30
-- WRG 8/25/86
31
-- PWN 01/31/95  REMOVED INCONSISTENCIES WITH ADA 9X.
32
 
33
WITH REPORT; USE REPORT;
34
PROCEDURE C35A07A IS
35
 
36
     -- THE NAME OF EACH TYPE OR SUBTYPE ENDS WITH THAT TYPE'S
37
     -- 'MANTISSA VALUE.
38
 
39
     TYPE MIDDLE_M3         IS DELTA 0.5   RANGE  0.0 .. 2.5;
40
     TYPE MIDDLE_M15        IS DELTA 2.0 **(-6) RANGE  -512.0 ..  512.0;
41
     TYPE LIKE_DURATION_M23 IS DELTA 0.020 RANGE -86_400.0 .. 86_400.0;
42
     TYPE DECIMAL_M18       IS DELTA 0.1   RANGE -10_000.0 .. 10_000.0;
43
     TYPE DECIMAL_M4        IS DELTA 100.0 RANGE   -1000.0 ..   1000.0;
44
          -- LARGEST MODEL NUMBER IS 960.0.
45
 
46
     -------------------------------------------------------------------
47
 
48
     SUBTYPE ST_LEFT_EDGE_M6 IS MIDDLE_M15
49
          DELTA 2.0 ** (-6) RANGE IDENT_INT (1) * (-1.0) .. 1.0;
50
     SUBTYPE ST_MIDDLE_M3    IS LIKE_DURATION_M23
51
          DELTA 0.5 RANGE  0.0 .. 2.5;
52
     SUBTYPE ST_DECIMAL_M7   IS DECIMAL_M18
53
          DELTA  10.0 RANGE -1000.0 .. 1000.0;
54
          -- LARGEST MODEL NUMBER IS 1016.0.
55
     SUBTYPE ST_DECIMAL_M3   IS DECIMAL_M4
56
          DELTA 100.0 RANGE  -500.0 ..  500.0;
57
          -- LARGEST MODEL NUMBER IS 448.0.
58
     SUBTYPE ST_MIDDLE_M15   IS MIDDLE_M15
59
          RANGE 6.0 .. 3.0;
60
 
61
BEGIN
62
 
63
     TEST ("C35A07A", "CHECK THAT FOR FIXED POINT TYPES THE FIRST " &
64
                      "AND LAST ATTRIBUTES YIELD CORRECT VALUES - " &
65
                      "BASIC TYPES");
66
 
67
     -------------------------------------------------------------------
68
 
69
 
70
     IF MIDDLE_M3'FIRST /= IDENT_INT (1) * 0.0 THEN
71
          FAILED ("MIDDLE_M3'FIRST /= 0.0");
72
     END IF;
73
     IF MIDDLE_M3'LAST /= IDENT_INT (1) * 2.5 THEN
74
          FAILED ("MIDDLE_M3'LAST /= 2.5");
75
     END IF;
76
 
77
     -------------------------------------------------------------------
78
 
79
 
80
     IF LIKE_DURATION_M23'FIRST /= IDENT_INT (1) * (-86_400.0) THEN
81
          FAILED ("LIKE_DURATION_M23'FIRST /= -86_400.0");
82
     END IF;
83
     IF LIKE_DURATION_M23'LAST  /= IDENT_INT (1) * 86_400.0 THEN
84
          FAILED ("LIKE_DURATION_M23'LAST  /=  86_400.0");
85
     END IF;
86
 
87
     -------------------------------------------------------------------
88
 
89
     IF DECIMAL_M18'FIRST /= IDENT_INT (1) * (-10_000.0) THEN
90
          FAILED ("DECIMAL_M18'FIRST /= -10_000.0");
91
     END IF;
92
     IF DECIMAL_M18'LAST /= IDENT_INT (1) * 10_000.0 THEN
93
          FAILED ("DECIMAL_M18'LAST /= 10_000.0");
94
     END IF;
95
 
96
     -------------------------------------------------------------------
97
 
98
 
99
     IF ST_MIDDLE_M3'FIRST /= IDENT_INT (1) * 0.0 THEN
100
          FAILED ("ST_MIDDLE_M3'FIRST /= 0.0");
101
     END IF;
102
     IF ST_MIDDLE_M3'LAST /= IDENT_INT (1) * 2.5 THEN
103
          FAILED ("ST_MIDDLE_M3'LAST /= 2.5");
104
     END IF;
105
 
106
     -------------------------------------------------------------------
107
 
108
     IF ST_DECIMAL_M7'FIRST /= IDENT_INT (1) * (-1000.0) THEN
109
          FAILED ("ST_DECIMAL_M7'FIRST /= -1000.0");
110
     END IF;
111
     IF ST_DECIMAL_M7'LAST /= IDENT_INT (1) * 1000.0 THEN
112
          FAILED ("ST_DECIMAL_M7'LAST /= 1000.0");
113
     END IF;
114
 
115
     -------------------------------------------------------------------
116
 
117
 
118
     IF ST_MIDDLE_M15'FIRST /= IDENT_INT (1) * 6.0 THEN
119
          FAILED ("ST_MIDDLE_M15'FIRST /= 6.0");
120
     END IF;
121
     IF ST_MIDDLE_M15'LAST /= IDENT_INT (1) * 3.0 THEN
122
          FAILED ("ST_MIDDLE_M15'LAST /= 3.0");
123
     END IF;
124
 
125
     -------------------------------------------------------------------
126
 
127
     RESULT;
128
 
129
END C35A07A;

powered by: WebSVN 2.1.0

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