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

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

Line No. Rev Author Line
1 294 jeremybenn
-- CE3207A.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 MODE_ERROR IS RAISED IF THE PARAMETER TO SET_INPUT HAS
27
--     MODE OUT_FILE OR THE PARAMETER TO SET_OUTPUT HAS MODE IN_FILE.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES.
32
 
33
-- HISTORY:
34
--     JLH 07/07/88  CREATED ORIGINAL TEST.
35
 
36
WITH REPORT; USE REPORT;
37
WITH TEXT_IO; USE TEXT_IO;
38
 
39
PROCEDURE CE3207A IS
40
 
41
     FILE1, FILE2 : FILE_TYPE;
42
     INCOMPLETE : EXCEPTION;
43
 
44
BEGIN
45
 
46
     TEST ("CE3207A", "CHECK THAT MODE_ERROR IS RAISED IF THE " &
47
                      "PARAMETER TO SET_INPUT HAS MODE OUT_FILE " &
48
                      "OR THE PARAMETER TO SET_OUTPUT HAS MODE " &
49
                      "IN_FILE");
50
 
51
     BEGIN
52
 
53
          BEGIN
54
               CREATE (FILE1, OUT_FILE);
55
          EXCEPTION
56
               WHEN USE_ERROR =>
57
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
58
                                    "WITH MODE OUT_FILE");
59
                    RAISE INCOMPLETE;
60
               WHEN OTHERS =>
61
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE");
62
                    RAISE INCOMPLETE;
63
          END;
64
 
65
          BEGIN
66
               SET_INPUT (FILE1);
67
               FAILED ("MODE_ERROR NOT RAISED FOR SET_INPUT WITH " &
68
                       "MODE OUT_FILE");
69
          EXCEPTION
70
               WHEN MODE_ERROR =>
71
                    NULL;
72
               WHEN OTHERS =>
73
                    FAILED ("WRONG EXCEPTION RAISED FOR SET_INPUT");
74
          END;
75
 
76
          CREATE (FILE2, OUT_FILE, LEGAL_FILE_NAME);
77
 
78
          PUT (FILE2, "OUTPUT STRING");
79
          CLOSE (FILE2);
80
          OPEN (FILE2, IN_FILE, LEGAL_FILE_NAME);
81
 
82
          BEGIN
83
               SET_OUTPUT (FILE2);
84
               FAILED ("MODE_ERROR NOT RAISED FOR SET_OUTPUT WITH " &
85
                       "MODE IN_FILE");
86
          EXCEPTION
87
               WHEN MODE_ERROR =>
88
                    NULL;
89
               WHEN OTHERS =>
90
                    FAILED ("WRONG EXCEPTION RAISED FOR SET_OUTPUT");
91
          END;
92
 
93
          BEGIN
94
               DELETE (FILE2);
95
          EXCEPTION
96
               WHEN USE_ERROR =>
97
                    NULL;
98
          END;
99
 
100
     EXCEPTION
101
          WHEN INCOMPLETE =>
102
               NULL;
103
     END;
104
 
105
     RESULT;
106
 
107
END CE3207A;

powered by: WebSVN 2.1.0

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