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/] [cd/] [cd1c03f.ada] - Blame information for rev 309

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CD1C03F.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 THE VALUE OF 'SMALL FOR A DERIVED FIXED POINT TYPE
27
--     IS INHERITED FROM THE PARENT IF THE VALUE OF 'SMALL FOR THE
28
--     PARENT WAS DETERMINED BY A 'SMALL SPECIFICATION CLAUSE.
29
 
30
-- HISTORY:
31
--     BCB 03/20/89  CHANGED EXTENSION FROM '.ADA' TO '.DEP'.
32
--     JET 09/17/87  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
PROCEDURE CD1C03F IS
36
 
37
     SPECIFIED_SMALL : CONSTANT := 0.25;
38
 
39
     TYPE FLT IS NEW FLOAT;
40
 
41
     TYPE PARENT_TYPE IS DELTA 1.0 RANGE 0.0 .. 100.0;
42
 
43
     FOR PARENT_TYPE'SMALL USE SPECIFIED_SMALL;
44
 
45
     TYPE DERIVED_TYPE IS NEW PARENT_TYPE;
46
 
47
     FUNCTION IDENT_FLT (F : FLT) RETURN FLT IS
48
     BEGIN
49
          IF EQUAL (3, 3) THEN
50
               RETURN F;
51
          ELSE
52
               RETURN 0.0;
53
          END IF;
54
     END;
55
 
56
BEGIN
57
 
58
     TEST("CD1C03F", "CHECK THAT THE VALUE OF 'SMALL FOR A " &
59
                     "DERIVED FIXED POINT TYPE IS INHERITED " &
60
                     "FROM THE PARENT IF THE VALUE OF 'SMALL " &
61
                     "FOR THE PARENT WAS DETERMINED BY A 'SMALL " &
62
                     "SPECIFICATION CLAUSE");
63
 
64
     IF PARENT_TYPE'SMALL /= IDENT_FLT (SPECIFIED_SMALL) THEN
65
          FAILED ("PARENT_TYPE'SMALL SHOULD BE EQUAL TO " &
66
                  "THE SPECIFIED VALUE");
67
     END IF;
68
 
69
     IF DERIVED_TYPE'SMALL /= IDENT_FLT (SPECIFIED_SMALL) THEN
70
          FAILED ("DERIVED_TYPE'SMALL SHOULD BE EQUAL TO " &
71
                  "THE SPECIFIED VALUE");
72
     END IF;
73
 
74
     RESULT;
75
 
76
END CD1C03F;

powered by: WebSVN 2.1.0

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