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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2404A.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 READ RAISES MODE_ERROR WHEN THE CURRENT MODE IS
27
--     OUT_FILE.
28
 
29
--          A)  CHECK NON-TEMPORARY FILES.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     CREATION OF DIRECT FILES WITH MODE OUT_FILE.
34
 
35
-- HISTORY:
36
--     DLD 08/17/82
37
--     SPS 11/09/82
38
--     SPS 11/22/82
39
--     JBG 02/22/84  CHANGE TO .ADA TEST.
40
--     EG  05/16/85
41
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
42
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
43
--     GMT 08/03/87  MOVED THE TEMP-FILE CASE TO CE2404B.ADA.
44
 
45
WITH REPORT; USE REPORT;
46
WITH DIRECT_IO;
47
 
48
PROCEDURE CE2404A IS
49
 
50
     PACKAGE DIR_IO IS NEW DIRECT_IO (INTEGER);
51
     USE DIR_IO;
52
     DIR_FILE_1 : FILE_TYPE;
53
     I          : INTEGER;
54
     INCOMPLETE : EXCEPTION;
55
 
56
BEGIN
57
     TEST ("CE2404A", "CHECK THAT READ RAISES MODE_ERROR WHEN THE " &
58
                      "CURRENT MODE IS OUT_FILE AND THE FILE IS " &
59
                      "A NON-TEMPORARY FILE");
60
     BEGIN
61
 
62
          CREATE (DIR_FILE_1, OUT_FILE, LEGAL_FILE_NAME);
63
 
64
     EXCEPTION
65
          WHEN USE_ERROR =>
66
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE - 1");
67
               RAISE INCOMPLETE;
68
          WHEN NAME_ERROR =>
69
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE - 2");
70
               RAISE INCOMPLETE;
71
          WHEN OTHERS =>
72
               FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE - 3");
73
               RAISE INCOMPLETE;
74
     END;
75
 
76
     BEGIN
77
          READ (DIR_FILE_1, I);
78
          FAILED ("MODE_ERROR NOT RAISED ON READ - 4");
79
     EXCEPTION
80
          WHEN MODE_ERROR =>
81
               NULL;
82
          WHEN OTHERS =>
83
               FAILED ("WRONG EXCEPTION RAISED ON READ - 5");
84
     END;
85
 
86
     BEGIN
87
          DELETE (DIR_FILE_1);
88
     EXCEPTION
89
          WHEN USE_ERROR =>
90
               NULL;
91
     END;
92
 
93
     RESULT;
94
 
95
EXCEPTION
96
     WHEN INCOMPLETE =>
97
          RESULT;
98
 
99
END CE2404A;

powered by: WebSVN 2.1.0

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