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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C24211A.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 LEGAL FORMS INVOLVING A DIGIT FOLLOWED BY A COLON ARE
27
--     CORRECTLY ANALYZED USING A TWO CHARACTER LOOK-AHEAD.
28
 
29
-- HISTORY:
30
--     DHH 01/19/88 CREATED ORIGINAL TEST.
31
 
32
WITH REPORT; USE REPORT;
33
 
34
PROCEDURE C24211A IS
35
 
36
     TYPE FIXED IS DELTA 0.0125 RANGE -1.0 .. 100.0;
37
 
38
     A : INTEGER RANGE 0 .. 2:10::= 1;
39
     B : INTEGER RANGE 0 .. 2#10#:= 1;
40
     X : FIXED RANGE 0.0 .. 16:3.0::= 1.0;
41
     Y : FIXED RANGE 0.0 .. 16#3.0#:= 1.0;
42
     IN2 : INTEGER;
43
     BOOL : BOOLEAN:=3:10:=3:10:;
44
 
45
BEGIN
46
 
47
     TEST("C24211A", "CHECK THAT LEGAL FORMS INVOLVING A DIGIT " &
48
                     "FOLLOWED BY A COLON ARE CORRECTLY ANALYZED " &
49
                     "USING A TWO CHARACTER LOOK-AHEAD");
50
 
51
     IF IDENT_INT(A) /= B THEN
52
          FAILED("CALCULATIONS OF BASED INTEGER LITERALS WHEN " &
53
                 "REPRESENTED BY SHARPS DO NOT MATCH CALCULATIONS " &
54
                 "OF BASED INTEGER LITERALS REPRESENTED BY COLONS");
55
     END IF;
56
     A := A + 1;
57
 
58
 
59
     IF EQUAL(3,3) THEN
60
          Y := X + Y;
61
     ELSE
62
          Y := X - Y;
63
     END IF;
64
 
65
     IF (2 * X) = Y THEN
66
          NULL;
67
     ELSE
68
          FAILED("CALCULATIONS OF BASED REAL LITERALS WHEN " &
69
                 "REPRESENTED BY SHARPS DO NOT MATCH CALCULATIONS " &
70
                 "OF BASED REAL LITERALS REPRESENTED BY COLONS");
71
     END IF;
72
     IF NOT BOOL THEN
73
          FAILED("BOOLEAN VALUE BASED ON REAL LITERAL WAS CALCULATED " &
74
                 "INCORRECTLY");
75
          IN2:=2:10:;
76
     ELSE
77
          BOOL := FALSE;
78
          IN2:=3:10:;
79
     END IF;
80
     IF BOOL THEN
81
          A := A + 1;
82
     ELSE
83
          A := A - 1;
84
     END IF;
85
 
86
     RESULT;
87
END C24211A;

powered by: WebSVN 2.1.0

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