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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CB1001A.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 ALL PREDEFINED EXCEPTIONS MAY BE RAISED EXPLICITLY
26
--    AND MAY HAVE HANDLERS WRITTEN FOR THEM.
27
 
28
-- *** NOTE: This test has been modified since ACVC version 1.11 to    -- 9X
29
-- ***       remove incompatibilities associated with the transition   -- 9X
30
-- ***       to Ada 9X.                                                -- 9X
31
-- ***                                                                 -- 9X
32
 
33
-- DCB 03/25/80
34
-- JRK 11/17/80
35
-- SPS 11/2/82
36
-- MRM 03/30/93   REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
37
 
38
WITH REPORT;
39
PROCEDURE CB1001A IS
40
 
41
     USE REPORT;
42
 
43
     FLOW_COUNT : INTEGER := 0;
44
 
45
BEGIN
46
     TEST("CB1001A", "CHECK THAT ALL PREDEFINED EXCEPTIONS MAY BE " &
47
          "RAISED EXPLICITLY AND MAY HAVE HANDLERS WRITTEN FOR THEM");
48
 
49
     BEGIN
50
          RAISE CONSTRAINT_ERROR;
51
          FAILED("NO EXCEPTION RAISED WHEN CONSTRAINT_ERROR EXPECTED");
52
 
53
     EXCEPTION
54
          WHEN CONSTRAINT_ERROR =>
55
               FLOW_COUNT := FLOW_COUNT + 1;
56
          WHEN OTHERS =>
57
               FAILED("WRONG EXCEPTION RAISED WHEN CONSTRAINT_ERROR " &
58
                      "EXPECTED");
59
     END;
60
 
61
 
62
     BEGIN
63
          RAISE PROGRAM_ERROR;
64
          FAILED("NO EXCEPTION RAISED WHEN PROGRAM_ERROR EXPECTED");
65
     EXCEPTION
66
          WHEN PROGRAM_ERROR =>
67
               FLOW_COUNT := FLOW_COUNT + 1;
68
          WHEN OTHERS =>
69
               FAILED("WRONG EXCEPTION RAISED WHEN PROGRAM_ERROR " &
70
                      "EXPECTED");
71
     END;
72
 
73
     BEGIN
74
          RAISE STORAGE_ERROR;
75
          FAILED("NO EXCEPTION RAISED WHEN STORAGE_ERROR EXPECTED");
76
 
77
     EXCEPTION
78
          WHEN STORAGE_ERROR =>
79
               FLOW_COUNT := FLOW_COUNT + 1;
80
          WHEN OTHERS =>
81
               FAILED("WRONG EXCEPTION RAISED WHEN STORAGE_ERROR " &
82
                      "EXPECTED");
83
     END;
84
 
85
     BEGIN
86
          RAISE TASKING_ERROR;
87
          FAILED("NO EXCEPTION RAISED WHEN TASKING_ERROR EXPECTED");
88
 
89
     EXCEPTION
90
          WHEN TASKING_ERROR =>
91
               FLOW_COUNT := FLOW_COUNT + 1;
92
          WHEN OTHERS =>
93
               FAILED("WRONG EXCEPTION RAISED WHEN TASKING_ERROR " &
94
                      "EXPECTED");
95
     END;
96
 
97
     IF FLOW_COUNT /= 4 THEN
98
          FAILED("WRONG FLOW_COUNT VALUE");
99
     END IF;
100
 
101
     RESULT;
102
END CB1001A;

powered by: WebSVN 2.1.0

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