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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce3104b.ada] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
-- CE3104B.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 THE FILE REMAINS OPEN AFTER A RESET.
27
 
28
-- APPLICABILITY CRITERIA:
29
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
30
--     TEXT FILES.
31
 
32
-- HISTORY:
33
--     DWC 08/13/87  CREATED ORIGINAL TEST.
34
 
35
WITH REPORT;
36
USE REPORT;
37
WITH TEXT_IO;
38
USE TEXT_IO;
39
 
40
PROCEDURE CE3104B IS
41
 
42
     INCOMPLETE : EXCEPTION;
43
     FILE   : FILE_TYPE;
44
     ITEM1  : STRING (1..5) := "STUFF";
45
 
46
BEGIN
47
 
48
     TEST ("CE3104B", "CHECK THAT THE FILE REMAINS OPEN AFTER " &
49
                      "A RESET");
50
 
51
     BEGIN
52
          CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
53
          PUT_LINE (FILE, ITEM1);
54
          CLOSE (FILE);
55
     EXCEPTION
56
          WHEN USE_ERROR | NAME_ERROR =>
57
               NOT_APPLICABLE ("CREATE WITH OUT_FILE MODE " &
58
                               "NOT SUPPORTED");
59
               RAISE INCOMPLETE;
60
          WHEN OTHERS =>
61
               FAILED ("UNEXPECTED EXCEPTION RAISED DURING " &
62
                       "FILE I/O");
63
               RAISE INCOMPLETE;
64
     END;
65
 
66
     BEGIN
67
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
68
     EXCEPTION
69
          WHEN USE_ERROR =>
70
               NOT_APPLICABLE ("OPEN WITH IN_FILE MODE NOT " &
71
                               "SUPPORTED");
72
               RAISE INCOMPLETE;
73
     END;
74
 
75
     BEGIN
76
          RESET (FILE);
77
     EXCEPTION
78
          WHEN USE_ERROR =>
79
               NULL;
80
     END;
81
 
82
     IF IS_OPEN (FILE) THEN
83
          CLOSE (FILE);
84
     ELSE
85
          FAILED ("RESET FOR IN_FILE, CLOSED FILE");
86
     END IF;
87
 
88
     BEGIN
89
          OPEN (FILE, OUT_FILE, LEGAL_FILE_NAME);
90
     EXCEPTION
91
          WHEN USE_ERROR =>
92
               NOT_APPLICABLE ("OPEN WITH OUT_FILE MODE NOT " &
93
                               "SUPPORTED");
94
               RAISE INCOMPLETE;
95
     END;
96
 
97
     BEGIN
98
          RESET (FILE);
99
     EXCEPTION
100
          WHEN USE_ERROR =>
101
               NULL;
102
     END;
103
 
104
     IF IS_OPEN (FILE) THEN
105
          BEGIN
106
               DELETE (FILE);
107
          EXCEPTION
108
               WHEN USE_ERROR =>
109
                    NULL;
110
          END;
111
     ELSE
112
          FAILED ("RESET FOR OUT_FILE CLOSED FILE");
113
     END IF;
114
 
115
     RESULT;
116
 
117
EXCEPTION
118
     WHEN INCOMPLETE =>
119
          RESULT;
120
END CE3104B;

powered by: WebSVN 2.1.0

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