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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE2108H.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 AN EXTERNAL DIRECT FILE SPECIFIED BY A NON-NULL
27
--     STRING NAME IS ACCESSIBLE AFTER THE COMPLETION OF THE MAIN
28
--     PROGRAM.
29
 
30
--     THIS TEST CHECKS THE CREATION OF A DIRECT FILE WHICH WAS
31
--     CREATED BY CE2108G.ADA.
32
 
33
-- APPLICABILITY CRITERIA:
34
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
35
--     DIRECT FILES.
36
 
37
-- HISTORY:
38
--     TBN 07/16/87  CREATED ORIGINAL TESTED.
39
 
40
WITH REPORT; USE REPORT;
41
WITH DIRECT_IO;
42
 
43
PROCEDURE CE2108H IS
44
 
45
     PACKAGE DIR IS NEW DIRECT_IO (INTEGER);
46
     USE DIR;
47
     INCOMPLETE : EXCEPTION;
48
     CHECK_SUPPORT, FILE_NAME : FILE_TYPE;
49
     PREVENT_EMPTY_FILE : NATURAL := 0;
50
 
51
BEGIN
52
     TEST ("CE2108H", "CHECK THAT AN EXTERNAL DIRECT FILE SPECIFIED " &
53
                      "BY A NON-NULL STRING NAME IS ACCESSIBLE AFTER " &
54
                      "THE COMPLETION OF THE MAIN PROGRAM");
55
 
56
     -- TEST FOR DIRECT FILE SUPPORT.
57
 
58
     BEGIN
59
          CREATE (CHECK_SUPPORT, OUT_FILE, LEGAL_FILE_NAME);
60
          BEGIN
61
               DELETE (CHECK_SUPPORT);
62
          EXCEPTION
63
               WHEN USE_ERROR =>
64
                    NULL;
65
          END;
66
     EXCEPTION
67
          WHEN USE_ERROR =>
68
               NOT_APPLICABLE ("USE_ERROR RAISED ON DIRECT CREATE " &
69
                               "WITH OUT_FILE MODE");
70
               RAISE INCOMPLETE;
71
          WHEN NAME_ERROR =>
72
               NOT_APPLICABLE ("NAME_ERROR RAISED ON DIRECT CREATE " &
73
                               "WITH OUT_FILE MODE");
74
               RAISE INCOMPLETE;
75
          WHEN OTHERS =>
76
               FAILED ("UNEXPECTED EXCEPTION RAISED ON DIRECT CREATE");
77
               RAISE INCOMPLETE;
78
     END;
79
 
80
     -- BEGIN TEST OBJECTIVE.
81
 
82
     BEGIN
83
          OPEN (FILE_NAME, IN_FILE, LEGAL_FILE_NAME(1, "CE2108G"));
84
     EXCEPTION
85
          WHEN USE_ERROR =>
86
               NOT_APPLICABLE ("USE_ERROR RAISED ON OPEN WITH " &
87
                               "IN_FILE MODE");
88
               RAISE INCOMPLETE;
89
     END;
90
 
91
     READ (FILE_NAME, PREVENT_EMPTY_FILE);
92
     IF PREVENT_EMPTY_FILE /= 5 THEN
93
          FAILED ("OPENED WRONG FILE OR DATA ERROR");
94
     END IF;
95
     BEGIN
96
          DELETE (FILE_NAME);
97
     EXCEPTION
98
          WHEN USE_ERROR =>
99
               COMMENT ("IMPLEMENTATION WOULD NOT ALLOW DELETION OF " &
100
                        "EXTERNAL FILE");
101
     END;
102
 
103
     RESULT;
104
 
105
EXCEPTION
106
     WHEN INCOMPLETE =>
107
          RESULT;
108
END CE2108H;

powered by: WebSVN 2.1.0

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