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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c91006a.ada] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
-- C91006A.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 IN A TASK SPECIFICATION ENTRY DECLARATIONS ARE ELABORATED
26
-- WHEN THE SPECIFICATION IS ELABORATED, AND IN TEXTUAL ORDER.
27
 
28
-- WEI  3/04/82
29
-- BHS  7/13/84
30
-- TBN 12/17/85     RENAMED FROM C910AHA-B.ADA;
31
--                  ADDED DECLARATIONS OF FIRST AND LAST.
32
-- PWB  5/15/86     MOVED DECLARATIONS OF FIRST, TASK T1, AND LAST
33
--                  INTO A DECLARE/BEGIN/END BLOCK.
34
 
35
WITH REPORT; USE REPORT;
36
PROCEDURE C91006A IS
37
 
38
     SUBTYPE ARG IS NATURAL RANGE 0..9;
39
     INDEX : INTEGER RANGE 0..5 := 0;
40
     SPYNUMB : STRING(1..5) := (1..5 => ' ');
41
 
42
     FUNCTION FINIT_POS (DIGT: IN ARG) RETURN NATURAL IS
43
          TEMP : STRING(1..2);
44
     BEGIN
45
          TEMP := ARG'IMAGE(DIGT);
46
          INDEX := INDEX + 1;
47
          SPYNUMB(INDEX) := TEMP(2);
48
          RETURN DIGT;
49
     END FINIT_POS;
50
 
51
BEGIN
52
     TEST ("C91006A", "CHECK THAT IN A TASK SPEC, ELABORATION IS IN " &
53
                      "TEXTUAL ORDER");
54
     DECLARE
55
 
56
          FIRST : INTEGER := FINIT_POS (1);
57
 
58
          TASK T1 IS
59
               ENTRY E2 (NATURAL RANGE 1 .. FINIT_POS (2));
60
               ENTRY E3 (NATURAL RANGE 1 .. FINIT_POS (3));
61
               ENTRY E4 (NATURAL RANGE 1 .. FINIT_POS (4));
62
          END T1;
63
 
64
          LAST : INTEGER := FINIT_POS (5);
65
 
66
          TASK BODY T1 IS
67
          BEGIN
68
               NULL;
69
          END T1;
70
 
71
     BEGIN
72
           NULL;
73
     END;
74
 
75
     IF SPYNUMB /= "12345" THEN
76
          FAILED ("TASK SPEC T1 NOT ELABORATED IN TEXTUAL ORDER");
77
          COMMENT ("ACTUAL ORDER WAS: " & SPYNUMB);
78
     END IF;
79
 
80
     RESULT;
81
 
82
END C91006A;

powered by: WebSVN 2.1.0

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