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/] [ce2403a.tst] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
-- CE2403A.TST
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, FOR DIRECT_IO, WRITE RAISES THE EXCEPTION
27
--     USE_ERROR IF THE CAPACITY OF THE EXTERNAL FILE IS EXCEEDED.
28
--     THIS TEST ONLY CHECKS THAT THE IMPLEMENTATION SUPPORTS AN
29
--     EXTERNAL FILE CAPACITY OF 4096 CHARACTERS OR LESS.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
33
--     DIRECT FILES.  ALSO, THE IMPLEMENTATION MUST BE ABLE TO
34
--     RESTRICT THE CAPACITY OF AN EXTERNAL FILE.
35
 
36
--     $FORM_STRING2 IS DEFINED SUCH THAT THE CAPACITY OF THE FILE IS
37
--     RESTRICTED TO 4096 CHARACTERS OR LESS. IF THE IMPLEMENTATION
38
--     CANNOT RESTRICT FILE CAPACITY, $FORM_STRING2 SHOULD EQUAL
39
--     "CANNOT_RESTRICT_FILE_CAPACITY".
40
 
41
-- HISTORY:
42
--     JLH 07/12/88  CREATED ORIGINAL TEST.
43
-- PWN 11/30/94 SUBTYPE QUALIFIED LITERALS FOR ADA 9X.
44
 
45
WITH REPORT; USE REPORT;
46
WITH DIRECT_IO;
47
 
48
PROCEDURE CE2403A IS
49
 
50
     SUBTYPE STR512 IS STRING (1 .. 512);
51
 
52
     PACKAGE DIR_IO IS NEW DIRECT_IO (STR512);
53
          USE DIR_IO;
54
 
55
     FILE : FILE_TYPE;
56
     ITEM : STR512 := (1 .. 512 => 'A');
57
     INCOMPLETE : EXCEPTION;
58
 
59
BEGIN
60
 
61
     TEST ("CE2403A", "CHECK FOR DIRECT_IO THAT WRITE RAISES " &
62
                      "USE_ERROR IF THE CAPACITY OF THE EXTERNAL " &
63
                      "FILE IS EXCEEDED");
64
 
65
     BEGIN
66
 
67
          IF
68
$FORM_STRING2
69
               = STRING'("CANNOT_RESTRICT_FILE_CAPACITY") THEN
70
               NOT_APPLICABLE ("IMPLEMENTATION CANNOT RESTRICT FILE " &
71
                               "CAPACITY");
72
               RAISE INCOMPLETE;
73
          ELSE
74
               BEGIN
75
                    CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME,
76
 
77
$FORM_STRING2
78
);
79
               EXCEPTION
80
                    WHEN USE_ERROR =>
81
                         NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
82
                                         "WITH MODE OUT_FILE");
83
                         RAISE INCOMPLETE;
84
                    WHEN NAME_ERROR =>
85
                         NOT_APPLICABLE ("NAME_ERROR RAISED ON " &
86
                                         "CREATE WITH MODE OUT_FILE");
87
                         RAISE INCOMPLETE;
88
                    WHEN OTHERS =>
89
                         FAILED ("UNEXPECTED EXCEPTION RAISED ON " &
90
                                 "CREATE");
91
                         RAISE INCOMPLETE;
92
               END;
93
          END IF;
94
 
95
          BEGIN
96
               FOR I IN 1 .. 9 LOOP
97
                    WRITE (FILE, ITEM);
98
               END LOOP;
99
               FAILED ("USE_ERROR NOT RAISED WHEN THE CAPACITY " &
100
                       "OF THE EXTERNAL FILE IS EXCEEDED");
101
          EXCEPTION
102
               WHEN USE_ERROR =>
103
                    NULL;
104
          END;
105
 
106
          BEGIN
107
               DELETE (FILE);
108
          EXCEPTION
109
               WHEN USE_ERROR =>
110
                    NULL;
111
          END;
112
 
113
     EXCEPTION
114
          WHEN INCOMPLETE =>
115
               NULL;
116
 
117
     END;
118
 
119
     RESULT;
120
 
121
END CE2403A;

powered by: WebSVN 2.1.0

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