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/] [c24003c.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C24003C.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 LEADING ZEROES IN INTEGRAL PARTS AND TRAILING ZEROES IN
26
-- FRACTIONAL PARTS OF FIXED POINT LITERALS ARE IGNORED.
27
 
28
-- JRK 12/12/79
29
-- JRK 12/16/80
30
-- TBN 10/21/85     RENAMED FROM C24003C.TST AND FIXED LINE LENGTH.
31
-- DTN 11/12/91     DELETED SUBPART (B).  CHANGED EXTENSION FROM '.TST' 
32
--                  TO '.ADA'.
33
 
34
WITH REPORT;
35
PROCEDURE C24003C IS
36
 
37
        USE REPORT;
38
 
39
        TYPE FIXED IS DELTA 1.0 RANGE 0.0 .. 1000.0;
40
        FX : FIXED := 69.0E1;
41
 
42
BEGIN
43
 
44
        TEST ("C24003C", "LEADING/TRAILING ZEROES IN " &
45
              "FIXED POINT LITERALS");
46
 
47
        IF 000000000000000000000000000000000000000069.0E1 /= FX THEN
48
                FAILED ("LEADING ZEROES IN INTEGRAL PART OF FIXED " &
49
                        "POINT LITERAL NOT IGNORED");
50
        END IF;
51
 
52
        IF 69.0000000000000000000000000000000000000000E1 /= FX THEN
53
                           -- MIGHT RAISE NUMERIC_ERROR AT COMPILE-TIME.
54
                FAILED ("TRAILING ZEROES IN FRACTIONAL PART OF " &
55
                        "FIXED POINT LITERAL NOT IGNORED");
56
        END IF;
57
 
58
        IF 0000000000000000000000000000000000000000690.00000 /= FX THEN
59
                FAILED ("LEADING/TRAILING ZEROES IN MANTISSA OF " &
60
                        "FIXED POINT LITERAL NOT IGNORED");
61
        END IF;
62
 
63
        IF 69.0E00000000000000000000000000000000000000001 /= FX THEN
64
                FAILED ("LEADING ZEROES IN EXPONENT OF FIXED " &
65
                        "POINT LITERAL NOT IGNORED");
66
        END IF;
67
 
68
        IF 16#00000000000000000000000000000000000000002B.2#E1 /= FX THEN
69
                FAILED ("LEADING ZEROES IN BASED FIXED POINT " &
70
                        "LITERAL NOT IGNORED");
71
        END IF;
72
 
73
        IF 16#2B.20000000000000000000000000000000000000000#E1 /= FX THEN
74
                FAILED ("TRAILING ZEROES IN BASED FIXED POINT " &
75
                        "LITERAL NOT IGNORED");
76
        END IF;
77
 
78
        RESULT;
79
END C24003C;

powered by: WebSVN 2.1.0

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