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/] [ce/] [ce3701a.ada] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
-- CE3701A.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 GET AND PUT OF INTEGER_IO RAISE STATUS_ERROR IF
27
--     THE FILE IS NOT OPEN.
28
 
29
-- HISTORY:
30
--     ABW 08/27/82
31
--     JBG 08/30/83
32
--     DWC 09/09/87  REMOVED UNNECESSARY CODE, CORRECTED EXCEPTION
33
--                   HANDLING, AND ATTEMPTED TO CREATE A FILE.
34
 
35
WITH REPORT; USE REPORT;
36
WITH TEXT_IO; USE TEXT_IO;
37
 
38
PROCEDURE CE3701A IS
39
 
40
     PACKAGE INT_IO IS NEW INTEGER_IO (INTEGER);
41
     USE INT_IO;
42
     FILE : FILE_TYPE;
43
     INT_ITEM : INTEGER := 7;
44
 
45
BEGIN
46
 
47
     TEST ("CE3701A", "CHECK THAT GET AND PUT RAISE " &
48
                       "STATUS_ERROR IF THE FILE " &
49
                       "IS NOT OPEN");
50
 
51
     BEGIN
52
          PUT (FILE, IDENT_INT(8));
53
          FAILED ("STATUS_ERROR NOT RAISED WHEN PUT APPLIED " &
54
                  "TO A NON-EXISTENT FILE");
55
     EXCEPTION
56
          WHEN STATUS_ERROR =>
57
               NULL;
58
          WHEN OTHERS =>
59
               FAILED ("UNEXPECTED EXCEPTION RAISED WHEN PUT " &
60
                       "APPLIED TO A NON-EXISTENT FILE");
61
     END;
62
 
63
     BEGIN
64
          GET (FILE, INT_ITEM);
65
          FAILED ("STATUS_ERROR NOT RAISED WHEN GET APPLIED " &
66
                  "TO A NON-EXISTENT FILE");
67
     EXCEPTION
68
          WHEN STATUS_ERROR =>
69
               NULL;
70
          WHEN OTHERS =>
71
               FAILED ("UNEXPECTED EXCEPTION RAISED WHEN GET " &
72
                       "APPLIED TO A NON-EXISTENT FILE");
73
     END;
74
 
75
     BEGIN
76
          CREATE (FILE);     -- THIS IS JUST AN ATTEMPT TO CREATE
77
          CLOSE (FILE);      -- A FILE.  WHETHER THIS IS SUCCESSFUL
78
     EXCEPTION               -- OR NOT HAS NO EFFECT ON TEST
79
          WHEN USE_ERROR =>  -- OBJECTIVE.
80
               NULL;
81
     END;
82
 
83
     BEGIN
84
          PUT (FILE, IDENT_INT(8));
85
          FAILED ("STATUS_ERROR NOT RAISED WHEN PUT APPLIED " &
86
                  "TO AN UNOPENED FILE");
87
     EXCEPTION
88
          WHEN STATUS_ERROR =>
89
               NULL;
90
          WHEN OTHERS =>
91
               FAILED ("UNEXPECTED EXCEPTION RAISED WHEN PUT " &
92
                       "APPLIED TO AN UNOPENED FILE");
93
     END;
94
 
95
     BEGIN
96
          GET (FILE, INT_ITEM);
97
          FAILED ("STATUS_ERROR NOT RAISED WHEN GET APPLIED " &
98
                  "TO AN UNOPENED FILE");
99
     EXCEPTION
100
          WHEN STATUS_ERROR =>
101
               NULL;
102
          WHEN OTHERS =>
103
               FAILED ("UNEXPECTED EXCEPTION RAISED WHEN GET " &
104
                       "APPLIED TO AN UNOPENED FILE");
105
     END;
106
 
107
     RESULT;
108
 
109
END CE3701A;

powered by: WebSVN 2.1.0

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