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

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

Line No. Rev Author Line
1 149 jeremybenn
-- CE2204B.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 AND END_OF_FILE ARE FORBIDDEN FOR SEQUENTIAL
27
--     FILES OF MODE OUT_FILE.
28
 
29
--          A) CHECK NON-TEMPORARY FILES.
30
 
31
-- APPLICABILITY CRITERIA:
32
--      THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--      THE CREATION OF SEQUENTIAL FILES.
34
 
35
-- HISTORY:
36
--     DLD 08/17/82
37
--     SPS 08/24/82
38
--     SPS 110/9/82
39
--     JBG 02/22/84  CHANGE TO .ADA TEST.
40
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
41
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
42
--     GMT 07/24/87  SPLIT THIS TEST BY MOVING THE CODE FOR CHECKING
43
--                   TEMPORARY FILES INTO CE2204D.ADA.
44
 
45
WITH REPORT; USE REPORT;
46
WITH SEQUENTIAL_IO;
47
 
48
PROCEDURE CE2204B IS
49
BEGIN
50
     TEST ("CE2204B", "FOR A NON-TEMPORARY SEQUENTIAL FILE, CHECK " &
51
                      "THAT MODE_ERROR IS RAISED BY READ AND " &
52
                      "END_OF_FILE WHEN THE MODE IS OUT_FILE");
53
     DECLARE
54
          PACKAGE SEQ_IO IS NEW SEQUENTIAL_IO (INTEGER);
55
          USE SEQ_IO;
56
          SEQ_FILE   : FILE_TYPE;
57
          X          : INTEGER;
58
          B          : BOOLEAN;
59
          INCOMPLETE : EXCEPTION;
60
     BEGIN
61
          BEGIN
62
               CREATE (SEQ_FILE, OUT_FILE, LEGAL_FILE_NAME);
63
          EXCEPTION
64
               WHEN USE_ERROR =>
65
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE - 1");
66
                    RAISE INCOMPLETE;
67
               WHEN NAME_ERROR =>
68
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE - 2");
69
                    RAISE INCOMPLETE;
70
               WHEN OTHERS =>
71
                    FAILED ("WRONG EXCEPTION RAISED ON CREATE - 3");
72
                    RAISE INCOMPLETE;
73
          END;
74
 
75
          WRITE (SEQ_FILE, 5);
76
 
77
          BEGIN                    -- THIS IS ONLY
78
               RESET (SEQ_FILE);   -- AN ATTEMPT
79
          EXCEPTION                -- TO RESET,
80
               WHEN USE_ERROR =>   -- IF RESET
81
                    NULL;          -- N/A THEN
82
          END;                     -- TEST IS
83
                                   -- NOT AFFECTED.
84
          BEGIN
85
               READ (SEQ_FILE, X);
86
               FAILED ("MODE_ERROR NOT RAISED ON READ - 4");
87
          EXCEPTION
88
               WHEN MODE_ERROR =>
89
                    NULL;
90
               WHEN OTHERS =>
91
                    FAILED ("WRONG EXCEPTION RAISED ON READ - 5");
92
          END;
93
 
94
          BEGIN
95
               B := END_OF_FILE (SEQ_FILE);
96
               FAILED ("MODE_ERROR NOT RAISED ON END_OF_FILE - 6");
97
          EXCEPTION
98
               WHEN MODE_ERROR =>
99
                    NULL;
100
               WHEN OTHERS =>
101
                    FAILED ("WRONG EXCEPTION RAISED - END_OF_FILE - 7");
102
          END;
103
 
104
          BEGIN
105
               DELETE (SEQ_FILE);
106
          EXCEPTION
107
               WHEN  USE_ERROR =>
108
                     NULL;
109
          END;
110
 
111
     EXCEPTION
112
          WHEN INCOMPLETE =>
113
               NULL;
114
     END;
115
 
116
     RESULT;
117
 
118
END CE2204B;

powered by: WebSVN 2.1.0

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