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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce2111i.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE2111I.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 A SUPPLIED MODE PARAMETER IN A RESET CHANGES
27
--     THE MODE OF A GIVEN FILE.  IF NO PARAMETER IS SUPPLIED
28
--     THE MODE REMAINS THE SAME.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
32
--     RESET FOR SEQUENTIAL FILES.
33
 
34
-- HISTORY:
35
--     JLH 07/23/87  CREATED ORIGINAL TEST.
36
 
37
WITH REPORT; USE REPORT;
38
WITH SEQUENTIAL_IO;
39
 
40
PROCEDURE CE2111I IS
41
 
42
     PACKAGE SEQ_IO IS NEW SEQUENTIAL_IO (INTEGER);
43
          USE SEQ_IO;
44
     SEQ_FILE : SEQ_IO.FILE_TYPE;
45
     SEQ_MODE : SEQ_IO.FILE_MODE;
46
     INCOMPLETE : EXCEPTION;
47
     VAR1 : INTEGER := 5;
48
 
49
BEGIN
50
 
51
     TEST("CE2111I", "CHECK THAT A SUPPLIED MODE PARAMETER SETS " &
52
                     "THE MODE OF THE GIVEN FILE APPROPRIATELY");
53
 
54
-- CREATE SEQUENTIAL TEST FILE
55
 
56
     BEGIN
57
          CREATE (SEQ_FILE, OUT_FILE, LEGAL_FILE_NAME);
58
          WRITE (SEQ_FILE, VAR1);
59
     EXCEPTION
60
          WHEN USE_ERROR =>
61
               NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE");
62
               RAISE INCOMPLETE;
63
          WHEN NAME_ERROR =>
64
               NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE");
65
               RAISE INCOMPLETE;
66
     END;
67
 
68
-- RESET TO DEFAULT
69
 
70
     BEGIN
71
          SEQ_MODE := IN_FILE;
72
          RESET (SEQ_FILE);
73
          SEQ_MODE := MODE (SEQ_FILE);
74
          IF SEQ_MODE /= OUT_FILE THEN
75
               FAILED ("DEFAULT RESET CHANGED MODE - SEQ");
76
          END IF;
77
     EXCEPTION
78
          WHEN USE_ERROR =>
79
               NOT_APPLICABLE ("RESET NOT SUPPORTED FOR SEQ OUT_FILE " &
80
                               "MODE");
81
               RAISE INCOMPLETE;
82
     END;
83
 
84
-- RESET TO IN_FILE
85
 
86
     BEGIN
87
          SEQ_MODE := OUT_FILE;
88
          RESET (SEQ_FILE, IN_FILE);
89
          SEQ_MODE := MODE (SEQ_FILE);
90
          IF SEQ_MODE /= IN_FILE THEN
91
               FAILED ("RESET TO IN_FILE FAILED - SEQ");
92
          END IF;
93
     EXCEPTION
94
          WHEN USE_ERROR =>
95
               NOT_APPLICABLE ("RESET FROM OUT_FILE TO IN_FILE MODE " &
96
                               "NOT SUPPORTED FOR SEQ FILES");
97
               RAISE INCOMPLETE;
98
     END;
99
 
100
     BEGIN
101
          DELETE (SEQ_FILE);
102
     EXCEPTION
103
          WHEN USE_ERROR =>
104
               NULL;
105
     END;
106
 
107
     RESULT;
108
 
109
EXCEPTION
110
     WHEN INCOMPLETE =>
111
          RESULT;
112
 
113
END CE2111I;

powered by: WebSVN 2.1.0

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