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/] [c9/] [c99005a.ada] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
-- C99005A.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 ATTRIBUTE 'COUNT RETURNS THE CORRECT VALUE.
27
 
28
-- HISTORY:
29
--     DHH 03/24/88 CREATED ORIGINAL TEST.
30
 
31
with Impdef;
32
WITH SYSTEM; USE SYSTEM;
33
WITH REPORT; USE REPORT;
34
PROCEDURE C99005A IS
35
 
36
BEGIN
37
 
38
     TEST("C99005A", "CHECK THAT THE ATTRIBUTE 'COUNT RETURNS THE " &
39
                     "CORRECT VALUE");
40
 
41
     DECLARE
42
          TASK A IS
43
          END A;
44
 
45
          TASK B IS
46
          END B;
47
 
48
          TASK C IS
49
          END C;
50
 
51
          TASK D IS
52
          END D;
53
 
54
          TASK E IS
55
          END E;
56
 
57
          TASK F IS
58
          END F;
59
 
60
          TASK G IS
61
          END G;
62
 
63
          TASK H IS
64
          END H;
65
 
66
          TASK I IS
67
          END I;
68
 
69
          TASK J IS
70
          END J;
71
 
72
          TASK T IS
73
               ENTRY WAIT;
74
          END T;
75
 
76
          TASK CHOICE IS
77
               ENTRY RETURN_CALL;
78
               ENTRY E2;
79
               ENTRY E1;
80
          END CHOICE;
81
 
82
          TASK BODY A IS
83
          BEGIN
84
               CHOICE.E1;
85
          END A;
86
 
87
          TASK BODY B IS
88
          BEGIN
89
               CHOICE.E1;
90
          END B;
91
 
92
          TASK BODY C IS
93
          BEGIN
94
               CHOICE.E1;
95
          END C;
96
 
97
          TASK BODY D IS
98
          BEGIN
99
               CHOICE.E1;
100
          END D;
101
 
102
          TASK BODY E IS
103
          BEGIN
104
               CHOICE.E1;
105
          END E;
106
 
107
          TASK BODY F IS
108
          BEGIN
109
               CHOICE.E2;
110
          END F;
111
 
112
          TASK BODY G IS
113
          BEGIN
114
               CHOICE.E2;
115
          END G;
116
 
117
          TASK BODY H IS
118
          BEGIN
119
               CHOICE.E2;
120
          END H;
121
 
122
          TASK BODY I IS
123
          BEGIN
124
               CHOICE.E2;
125
          END I;
126
 
127
          TASK BODY J IS
128
          BEGIN
129
               CHOICE.E2;
130
          END J;
131
 
132
          TASK BODY T IS
133
          BEGIN
134
               LOOP
135
                    SELECT
136
                         ACCEPT WAIT DO
137
                              DELAY 1.0 * Impdef.One_Second;
138
                         END WAIT;
139
                         CHOICE.RETURN_CALL;
140
                    OR
141
                         TERMINATE;
142
                    END SELECT;
143
               END LOOP;
144
          END T;
145
 
146
          TASK BODY CHOICE IS
147
          BEGIN
148
               WHILE E1'COUNT + E2'COUNT < 10 LOOP
149
                    T.WAIT;
150
                    ACCEPT RETURN_CALL;
151
               END LOOP;
152
 
153
               FOR I IN REVERSE 1 ..10 LOOP
154
                    SELECT
155
                         ACCEPT E2 DO
156
                              IF (E2'COUNT + E1'COUNT + 1) /= I THEN
157
                                   FAILED("'COUNT NOT RETURNING " &
158
                                          "CORRECT VALUE FOR LOOP" &
159
                                           INTEGER'IMAGE(I) & "VALUE " &
160
                                           INTEGER'IMAGE((E2'COUNT
161
                                           + E1'COUNT + 1)));
162
                              END IF;
163
                         END E2;
164
                    OR
165
                         ACCEPT E1 DO
166
                              IF (E2'COUNT + E1'COUNT + 1) /= I THEN
167
                                   FAILED("'COUNT NOT RETURNING " &
168
                                          "CORRECT VALUE FOR LOOP" &
169
                                           INTEGER'IMAGE(I) & "VALUE " &
170
                                           INTEGER'IMAGE((E2'COUNT
171
                                           + E1'COUNT + 1)));
172
                              END IF;
173
                         END E1;
174
                    END SELECT;
175
               END LOOP;
176
           END CHOICE;
177
 
178
     BEGIN
179
          NULL;
180
     END;
181
 
182
     RESULT;
183
END C99005A;

powered by: WebSVN 2.1.0

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