OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C35503O.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 'FIRST' AND 'LAST' YIELD THE CORRECT RESULTS WHEN THE
27
--     PREFIX IS AN INTEGER TYPE.
28
 
29
-- HISTORY:
30
--     RJW 03/17/86 CREATED ORIGINAL TEST.
31
--     DHH 10/19/87 SHORTENED LINES CONTAINING MORE THAN 72 CHARACTERS.
32
 
33
WITH REPORT; USE REPORT;
34
 
35
PROCEDURE C35503O IS
36
 
37
BEGIN
38
     TEST ("C35503O", "CHECK THAT 'FIRST' AND 'LAST' YIELD THE " &
39
                      "CORRECT RESULTS WHEN THE PREFIX IS AN " &
40
                      "INTEGER TYPE" );
41
 
42
     DECLARE
43
          SUBTYPE SINTEGER IS INTEGER;
44
          SUBTYPE SMALL IS INTEGER RANGE IDENT_INT(-10) ..
45
                                                         IDENT_INT(10);
46
          SUBTYPE NOINTEGER IS INTEGER
47
            RANGE IDENT_INT(5) .. IDENT_INT(-7);
48
 
49
          TYPE INT IS RANGE -6 .. 6;
50
          SUBTYPE SINT IS INT
51
            RANGE INT(IDENT_INT(-4)) .. INT(IDENT_INT(4));
52
          SUBTYPE NOINT IS INT
53
            RANGE INT(IDENT_INT(1)) .. INT(IDENT_INT(-1));
54
          TYPE NEWINT IS NEW INTEGER RANGE IDENT_INT(-9) ..
55
                                                          IDENT_INT(-2);
56
          SUBTYPE SNEWINT IS NEWINT RANGE -7 .. -5;
57
          SUBTYPE NONEWINT IS NEWINT RANGE 3 .. -15;
58
 
59
     BEGIN
60
          IF SINTEGER'FIRST /= INTEGER'FIRST THEN
61
               FAILED ( "WRONG VALUE FOR SINTEGER'FIRST" );
62
          END IF;
63
          IF SINTEGER'LAST /= INTEGER'LAST THEN
64
               FAILED ( "WRONG VALUE FOR SINTEGER'LAST" );
65
          END IF;
66
 
67
          IF SMALL'FIRST /= -10 THEN
68
               FAILED ( "WRONG VALUE FOR SMALL'FIRST" );
69
          END IF;
70
          IF SMALL'LAST /= 10 THEN
71
               FAILED ( "WRONG VALUE FOR SMALL'LAST" );
72
          END IF;
73
 
74
          IF NOINTEGER'FIRST /= 5 THEN
75
               FAILED ( "WRONG VALUE FOR NOINTEGER'FIRST" );
76
          END IF;
77
          IF NOINTEGER'LAST /= -7 THEN
78
               FAILED ( "WRONG VALUE FOR NOINTEGER'LAST" );
79
          END IF;
80
 
81
          IF INT'FIRST /= -6 THEN
82
               FAILED ( "WRONG VALUE FOR INT'FIRST" );
83
          END IF;
84
          IF INT'LAST /= 6 THEN
85
               FAILED ( "WRONG VALUE FOR INT'LAST" );
86
          END IF;
87
 
88
          IF SINT'FIRST /= -4 THEN
89
               FAILED ( "WRONG VALUE FOR SINT'FIRST" );
90
          END IF;
91
          IF SINT'LAST /= 4 THEN
92
               FAILED ( "WRONG VALUE FOR SINT'LAST" );
93
          END IF;
94
 
95
          IF NOINT'FIRST /= 1 THEN
96
               FAILED ( "WRONG VALUE FOR NOINT'FIRST" );
97
          END IF;
98
          IF NOINT'LAST /= -1 THEN
99
               FAILED ( "WRONG VALUE FOR NOINT'LAST" );
100
          END IF;
101
 
102
          IF NEWINT'FIRST /= -9 THEN
103
               FAILED ( "WRONG VALUE FOR NEWINT'FIRST" );
104
          END IF;
105
          IF NEWINT'LAST /= -2 THEN
106
               FAILED ( "WRONG VALUE FOR NEWINT'LAST" );
107
          END IF;
108
 
109
          IF SNEWINT'FIRST /= -7 THEN
110
               FAILED ( "WRONG VALUE FOR SNEWINT'FIRST" );
111
          END IF;
112
          IF SNEWINT'LAST /= -5 THEN
113
               FAILED ( "WRONG VALUE FOR SNEWINT'LAST" );
114
          END IF;
115
 
116
          IF NONEWINT'FIRST /= 3 THEN
117
               FAILED ( "WRONG VALUE FOR NONEWINT'FIRST" );
118
          END IF;
119
          IF NONEWINT'LAST /= -15 THEN
120
               FAILED ( "WRONG VALUE FOR NONEWINT'LAST" );
121
          END IF;
122
     END;
123
 
124
     RESULT;
125
END C35503O;

powered by: WebSVN 2.1.0

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