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

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

Line No. Rev Author Line
1 149 jeremybenn
-- CE2408B.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 DOES NOT CAUSE AN EXCEPTION WHEN THE TO
27
--     PARAMETER IS GREATER THAN THE END POSITION.
28
 
29
--          2) FILE MODE IS INOUT_FILE.
30
 
31
-- APPLICABILITY CRITERIA:
32
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
33
--     CREATION OF DIRECT FILES WITH MODE INOUT_FILE.
34
 
35
-- HISTORY:
36
--     GMT 08/05/87  CREATED ORIGINAL TEST.
37
 
38
WITH REPORT; USE REPORT;
39
WITH DIRECT_IO;
40
 
41
PROCEDURE CE2408B IS
42
 
43
     PACKAGE DIR_IO IS NEW DIRECT_IO (INTEGER);
44
     USE DIR_IO;
45
 
46
     DIR_FILE   : FILE_TYPE;
47
     INCOMPLETE : EXCEPTION;
48
 
49
BEGIN
50
     TEST ("CE2408B", "FOR FILES OF MODE INOUT_FILE, CHECK THAT " &
51
                      "WRITE DOES NOT CAUSE AN EXCEPTION WHEN THE " &
52
                      """TO"" PARAMETER IS GREATER THAN THE END " &
53
                      "POSITION");
54
     BEGIN
55
          CREATE (DIR_FILE, INOUT_FILE, LEGAL_FILE_NAME);
56
     EXCEPTION
57
          WHEN USE_ERROR =>
58
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE WITH " &
59
                               "MODE INOUT_FILE FOR DIR_IO - 1");
60
               RAISE INCOMPLETE;
61
          WHEN NAME_ERROR =>
62
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE WITH " &
63
                               "MODE INOUT_FILE FOR DIR_IO - 2");
64
               RAISE INCOMPLETE;
65
          WHEN OTHERS =>
66
               FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE WITH " &
67
                       "MODE INOUT_FILE FOR DIR_IO - 3");
68
               RAISE INCOMPLETE;
69
     END;
70
 
71
     -- FILL UP FILE
72
 
73
     WRITE (DIR_FILE, 3);
74
     WRITE (DIR_FILE, 4);
75
     WRITE (DIR_FILE, 5);
76
     WRITE (DIR_FILE, 6);
77
 
78
     -- WRITE WHERE TO IS LARGER THAN END OF FILE
79
 
80
     BEGIN
81
          WRITE (DIR_FILE, 9, 7);
82
     EXCEPTION
83
          WHEN OTHERS =>
84
               FAILED ("WRITE RAISED EXCEPTION WHEN TO " &
85
                       "PARAMETER WAS BEYOND END - 4");
86
     END;
87
 
88
     BEGIN
89
          SET_INDEX (DIR_FILE, 11);
90
          WRITE (DIR_FILE, 10);
91
     EXCEPTION
92
          WHEN OTHERS =>
93
               FAILED ("SET_INDEX/WRITE RAISED EXCEPTION WHEN TO " &
94
                       "PARAMETER EXCEEDS THE END POSITION - 5");
95
     END;
96
 
97
     -- DELETE TEST FILE
98
 
99
     BEGIN
100
          DELETE (DIR_FILE);
101
     EXCEPTION
102
          WHEN USE_ERROR =>
103
               NULL;
104
     END;
105
 
106
     RESULT;
107
 
108
EXCEPTION
109
     WHEN INCOMPLETE =>
110
          RESULT;
111
 
112
END CE2408B;

powered by: WebSVN 2.1.0

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