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/] [c4/] [c45611a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
--  C45611A.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 EXPONENTIATION OF AN INTEGER TO AN INTEGER VALUE IS 
26
--  CORRECTLY EVALUATED.
27
 
28
--  H. TILTON 9/23/86
29
 
30
WITH REPORT; USE REPORT;
31
 
32
PROCEDURE C45611A IS
33
 
34
    I1,INT : INTEGER;
35
 
36
    BEGIN
37
 
38
 
39
         TEST ("C45611A", "CHECK THAT EXPONENTIATION OF AN INTEGER " &
40
                          "VALUE IS CORRECTLY EVALUATED");
41
 
42
         I1 := IDENT_INT(0) ** IDENT_INT(0);
43
 
44
         IF IDENT_INT(I1) /= IDENT_INT(1) THEN
45
              FAILED( "INCORRECT RESULT FOR '0**0'" );
46
         END IF;
47
 
48
         INT := "**" (IDENT_INT(0),IDENT_INT(1));
49
 
50
         IF IDENT_INT(INT) /= IDENT_INT(0) THEN
51
              FAILED( "INCORRECT RESULT FOR '0**1'" );
52
         END IF;
53
 
54
         I1 := IDENT_INT(6) ** IDENT_INT(0);
55
 
56
         IF IDENT_INT(I1) /= IDENT_INT(1) THEN
57
              FAILED( "INCORRECT RESULT FOR '6**0'" );
58
         END IF;
59
 
60
         INT := IDENT_INT(156) ** IDENT_INT(1);
61
 
62
         IF IDENT_INT(INT) /= IDENT_INT(156) THEN
63
              FAILED( "INCORRECT RESULT FOR '156**1'" );
64
         END IF;
65
 
66
         I1 := IDENT_INT(-3) ** IDENT_INT(0);
67
 
68
         IF IDENT_INT(I1) /= IDENT_INT(1) THEN
69
              FAILED( "INCORRECT RESULT FOR '(-3)**0'" );
70
         END IF;
71
 
72
         INT := "**" (IDENT_INT(-7),IDENT_INT(1));
73
 
74
         IF IDENT_INT(INT) /= IDENT_INT(-7) THEN
75
              FAILED( "INCORRECT RESULT FOR '(-7)**1'" );
76
         END IF;
77
 
78
         I1 := "**" (IDENT_INT(-1),IDENT_INT(2));
79
 
80
         IF IDENT_INT(I1) /= IDENT_INT(1) THEN
81
              FAILED( "INCORRECT RESULT FOR '(-1)**2'" );
82
         END IF;
83
 
84
 
85
         INT := IDENT_INT(-1) ** 3;
86
 
87
         IF IDENT_INT(INT) /= IDENT_INT(-1) THEN
88
              FAILED( "INCORRECT RESULT FOR '(-1)**3'" );
89
         END IF;
90
 
91
         INT := "**" (IDENT_INT(0),IDENT_INT(2));
92
 
93
         IF IDENT_INT(INT) /= IDENT_INT(0) THEN
94
              FAILED( "INCORRECT RESULT FOR '0**2'" );
95
         END IF;
96
 
97
         INT := IDENT_INT(0) ** IDENT_INT(10);
98
 
99
         IF IDENT_INT(INT) /= IDENT_INT(0) THEN
100
              FAILED( "INCORRECT RESULT FOR '0**10'" );
101
         END IF;
102
 
103
         INT := "**" (IDENT_INT(6),IDENT_INT(2));
104
 
105
         IF IDENT_INT(INT) /= IDENT_INT(36) THEN
106
              FAILED( "INCORRECT RESULT FOR '6**2'" );
107
         END IF;
108
 
109
         INT := "**" (IDENT_INT(2),IDENT_INT(2));
110
 
111
         IF IDENT_INT(INT) /= IDENT_INT(4) THEN
112
              FAILED( "INCORRECT RESULT FOR '2**2'" );
113
         END IF;
114
 
115
         I1 := "**" (IDENT_INT(1),IDENT_INT(10));
116
 
117
         IF IDENT_INT(I1) /= IDENT_INT(1) THEN
118
              FAILED( "INCORRECT RESULT FOR '1**10'" );
119
         END IF;
120
 
121
         RESULT;
122
 
123
    END C45611A;

powered by: WebSVN 2.1.0

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