OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce2407b.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- CE2407B.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
--          2) CHECK TEMPORARY FILES.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     CREATE WITH OUT_FILE MODE AND RESET FROM OUT_FILE MODE TO
34
--     IN_FILE MODE.
35
 
36
-- HISTORY:
37
--     GMT 08/06/86  CREATED ORIGINAL TEST.
38
 
39
WITH REPORT; USE REPORT;
40
WITH DIRECT_IO;
41
 
42
PROCEDURE CE2407B IS
43
 
44
     PACKAGE DIR IS NEW DIRECT_IO (INTEGER);
45
     USE DIR;
46
     INCOMPLETE : EXCEPTION;
47
     FILE2      : FILE_TYPE;
48
     INT        : INTEGER := IDENT_INT (18);
49
 
50
BEGIN
51
     TEST ("CE2407B", "CHECK THAT WRITE RAISES MODE_ERROR WHEN THE " &
52
                      "CURRENT MODE IS IN_FILE AND THE FILE IS " &
53
                      "A TEMPORARY FILE");
54
     BEGIN
55
          CREATE (FILE2, OUT_FILE);
56
     EXCEPTION
57
          WHEN USE_ERROR =>
58
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE - 1");
59
               RAISE INCOMPLETE;
60
          WHEN OTHERS =>
61
               FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE - 2");
62
               RAISE INCOMPLETE;
63
     END;
64
 
65
     WRITE (FILE2, INT);
66
 
67
     BEGIN
68
          RESET (FILE2, IN_FILE);
69
     EXCEPTION
70
          WHEN USE_ERROR =>
71
               NOT_APPLICABLE("USE_ERROR RAISED ON RESET - 3");
72
               RAISE INCOMPLETE;
73
     END;
74
 
75
     BEGIN
76
          WRITE (FILE2, INT);
77
          FAILED ("MODE_ERROR NOT RAISED ON WRITE - 4");
78
     EXCEPTION
79
          WHEN MODE_ERROR =>
80
               NULL;
81
          WHEN OTHERS =>
82
               FAILED ("OTHER EXCEPTION RAISED ON WRITE - 5");
83
     END;
84
 
85
     CLOSE (FILE2);
86
 
87
     RESULT;
88
 
89
EXCEPTION
90
     WHEN INCOMPLETE =>
91
          RESULT;
92
 
93
END CE2407B;

powered by: WebSVN 2.1.0

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