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

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

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

powered by: WebSVN 2.1.0

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