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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c2/] [c24202d.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C24202D.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 NON-CONSECUTIVE UNDERSCORES ARE PERMITTED
26
-- IN EVERY PART OF BASED INTEGER, FLOATING POINT, AND FIXED POINT LITERALS.
27
 
28
-- WMC 03/16/92  CONSOLIDATION OF C24202A.ADA, C24202B.ADA, C24202C.ADA
29
 
30
WITH REPORT;
31
 
32
PROCEDURE C24202D IS
33
 
34
     USE REPORT;
35
 
36
     TYPE FIXED1 IS DELTA 2.0**(-6) RANGE 0.0 .. 10.0;
37
 
38
     I1, I2     : INTEGER;
39
     F1, F2, F3 : FLOAT;
40
     F4, F5     : FIXED1;
41
 
42
BEGIN
43
     TEST("C24202D", "UNDERSCORES ALLOWED IN NUMERIC LITERALS");
44
 
45
     I1 := 12_3;
46
     I2 := 16#D#E0_1;
47
 
48
     IF (I1 /= 123) OR (I2 /= 16#D#E01) THEN
49
          FAILED("UNDERSCORES IN INTEGER LITERALS NOT HANDLED CORRECTLY");
50
     END IF;
51
 
52
 
53
     F1 := 1.2_5E1;
54
     F2 := 8#1_3.5#;
55
     F3 := 8#3.4#E1_1;
56
 
57
     IF (F1 /= 1.25E1) OR (F2 /= 8#13.5#) OR (F3 /= 8#3.4#E11) THEN
58
          FAILED("UNDERSCORES IN FLOATING POINT LITERALS NOT " &
59
                 "HANDLED CORRECTLY");
60
     END IF;
61
 
62
 
63
     F4 := 1_6#1.A#;
64
     F5 := 8#2.3_7#;
65
 
66
     IF (F4 /= 16#1.A#) OR (F5 /= 8#2.37#) THEN
67
          FAILED("UNDERSCORES IN FIXED POINT LITERALS NOT " &
68
                 "HANDLED CORRECTLY");
69
     END IF;
70
 
71
     RESULT;
72
 
73
END C24202D;

powered by: WebSVN 2.1.0

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