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/] [ce2407a.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
-- CE2407A.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 WRITE RAISES MODE_ERROR WHEN THE CURRENT MODE
27
--     IS IN_FILE.
28
 
29
--          1) CHECK NON-TEMPORARY FILES.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     CREATE WITH OUT_FILE MODE AND OPEN WITH IN_FILE MODE FOR DIRECT
34
--     FILES.
35
 
36
-- HISTORY:
37
--     ABW 08/20/82
38
--     SPS 09/16/82
39
--     SPS 11/09/82
40
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
41
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
42
--     GMT 08/06/86  REMOVED THE DEPENDENCE ON RESET AND MOVED THE CHECK
43
--                   FOR TEMPORARY FILES INTO CE2407B.ADA.
44
 
45
WITH REPORT; USE REPORT;
46
WITH DIRECT_IO;
47
 
48
PROCEDURE CE2407A IS
49
 
50
     PACKAGE DIR IS NEW DIRECT_IO (INTEGER);
51
     USE DIR;
52
     INCOMPLETE : EXCEPTION;
53
     FILE1      : FILE_TYPE;
54
     INT        : INTEGER := IDENT_INT (18);
55
 
56
BEGIN
57
     TEST ("CE2407A", "CHECK THAT WRITE RAISES MODE_ERROR WHEN THE " &
58
                      "CURRENT MODE IS IN_FILE AND THE FILE IS " &
59
                      "A NON-TEMPORARY FILE");
60
     BEGIN
61
          CREATE (FILE1, OUT_FILE, LEGAL_FILE_NAME);
62
     EXCEPTION
63
          WHEN USE_ERROR =>
64
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE - 1");
65
               RAISE INCOMPLETE;
66
          WHEN NAME_ERROR =>
67
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE - 2");
68
               RAISE INCOMPLETE;
69
          WHEN OTHERS =>
70
               FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE - 3");
71
               RAISE INCOMPLETE;
72
     END;
73
 
74
     WRITE (FILE1, INT);
75
     CLOSE (FILE1);
76
 
77
     BEGIN
78
          OPEN (FILE1, IN_FILE, LEGAL_FILE_NAME);
79
     EXCEPTION
80
          WHEN USE_ERROR =>
81
               NOT_APPLICABLE("USE_ERROR RAISED ON OPEN - 4");
82
               RAISE INCOMPLETE;
83
     END;
84
 
85
 
86
 
87
     BEGIN
88
          WRITE (FILE1,INT);
89
          FAILED ("MODE_ERROR NOT RAISED ON WRITE - 5");
90
     EXCEPTION
91
          WHEN MODE_ERROR =>
92
               NULL;
93
          WHEN OTHERS =>
94
               FAILED ("OTHER EXCEPTION RAISED ON WRITE - 6");
95
     END;
96
 
97
     BEGIN
98
          DELETE (FILE1);
99
     EXCEPTION
100
          WHEN USE_ERROR =>
101
               NULL;
102
     END;
103
 
104
     RESULT;
105
 
106
EXCEPTION
107
     WHEN INCOMPLETE =>
108
          RESULT;
109
 
110
END CE2407A;

powered by: WebSVN 2.1.0

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