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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c35503d.tst] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C35503D.TST
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 'IMAGE' AND 'VALUE' YIELD THE CORRECT RESULT FOR THE
27
--     LARGEST/SMALLEST INTEGER LITERAL FOR THE LONGEST INTEGER TYPE.
28
 
29
-- HISTORY:
30
--     RJW 02/26/86 CREATED ORIGINAL TEST.
31
--     DHH 10/19/87 SHORTENED LINES CONTAINING MORE THAN 72 CHARACTERS.
32
 
33
WITH SYSTEM; USE SYSTEM;
34
WITH REPORT; USE REPORT;
35
 
36
PROCEDURE C35503D IS
37
 
38
     TYPE INT IS RANGE MIN_INT .. MAX_INT;
39
 
40
     FUNCTION IDENT (X:INT) RETURN INT IS
41
          BEGIN
42
               IF EQUAL (3,3) THEN
43
                    RETURN X;
44
               END IF;
45
               RETURN 0;
46
          END IDENT;
47
 
48
BEGIN
49
     TEST ("C35503D", "CHECK THAT 'IMAGE' AND 'VALUE' YIELD " &
50
                      "CORRECT RESULTS FOR THE LARGEST/SMALLEST "&
51
                      "INTEGER LITERAL FOR THE LARGEST INTEGER TYPE");
52
 
53
     -- MIN_INT IS THE DECIMAL LITERAL FOR SYSTEM.MIN_INT.
54
     -- MAX_INT IS THE DECIMAL LITERAL FOR SYSTEM.MAX_INT.
55
 
56
     BEGIN
57
          IF INT'VALUE (IDENT_STR("$MIN_INT")) /= MIN_INT THEN
58
               FAILED("INCORRECT RESULTS FOR 'VALUE' - MIN_INT");
59
          END IF;
60
     EXCEPTION
61
           WHEN CONSTRAINT_ERROR =>
62
               FAILED("CONSTRAINT_ERROR RAISED FOR 'VALUE' - MIN_INT");
63
           WHEN OTHERS =>
64
               FAILED("OTHER EXCEPTION RAISED FOR 'VALUE' - MIN_INT");
65
     END;
66
 
67
     BEGIN
68
           IF INT'IMAGE (IDENT(MIN_INT)) /= "$MIN_INT" THEN
69
                FAILED("INCORRECT RESULTS FOR 'IMAGE' - MIN_INT");
70
           END IF;
71
     EXCEPTION
72
          WHEN OTHERS =>
73
               FAILED("EXCEPTION RAISED FOR 'IMAGE' - MIN_INT");
74
     END;
75
 
76
     BEGIN
77
           IF INT'VALUE (IDENT_STR("$MAX_INT")) /= MAX_INT THEN
78
               FAILED("INCORRECT RESULTS FOR 'VALUE' - MAX_INT");
79
           END IF;
80
     EXCEPTION
81
           WHEN CONSTRAINT_ERROR =>
82
               FAILED("CONSTRAINT_ERROR RAISED FOR 'VALUE' - MAX_INT");
83
           WHEN OTHERS =>
84
               FAILED("OTHER EXCEPTION RAISED FOR 'VALUE' - MAX_INT");
85
     END;
86
 
87
     BEGIN
88
           IF INT'IMAGE (IDENT(MAX_INT)) /= ' ' & "$MAX_INT" THEN
89
               FAILED("INCORRECT RESULTS FOR 'IMAGE' - MAXINT");
90
           END IF;
91
     EXCEPTION
92
          WHEN OTHERS =>
93
               FAILED("EXCEPTION RAISED FOR 'IMAGE' - MAXINT");
94
     END;
95
 
96
     RESULT;
97
END C35503D;

powered by: WebSVN 2.1.0

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