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/] [e/] [ee3204a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- EE3204A.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 AFTER THE DEFAULT FILES HAVE BEEN REDEFINED,
27
--     OUTPUT ON THE STANDARD FILES IS STILL PROPERLY HANDLED.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES.
32
 
33
-- PASS/FAIL CRITERIA:
34
--     THIS TEST IS PASSED IF IT EXECUTES, PRINTS TENTATIVELY PASSED,
35
--     AND THE CONTENTS OF THE STANDARD OUTPUT FILE ARE CORRECT.
36
 
37
-- HISTORY:
38
--     JLH 07/08/88  CREATED ORIGINAL TEST.
39
 
40
WITH REPORT; USE REPORT;
41
WITH TEXT_IO; USE TEXT_IO;
42
 
43
PROCEDURE EE3204A IS
44
 
45
     FILE1, FILE2 : FILE_TYPE;
46
     ITEM : CHARACTER := 'B';
47
     INCOMPLETE : EXCEPTION;
48
 
49
BEGIN
50
 
51
     TEST ("EE3204A", "CHECK THAT AFTER THE DEFAULT FILES HAVE BEEN " &
52
                      "REDEFINED, OUTPUT ON THE STANDARD " &
53
                      "FILES IS STILL PROPERLY HANDLED");
54
 
55
     BEGIN
56
 
57
          BEGIN
58
               CREATE (FILE1, OUT_FILE, LEGAL_FILE_NAME);
59
          EXCEPTION
60
               WHEN USE_ERROR =>
61
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
62
                                    "WITH MODE OUT_FILE");
63
                    RAISE INCOMPLETE;
64
               WHEN NAME_ERROR =>
65
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE " &
66
                                    "WITH MODE OUT_FILE");
67
                    RAISE INCOMPLETE;
68
               WHEN OTHERS =>
69
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE");
70
                    RAISE INCOMPLETE;
71
          END;
72
 
73
          CREATE (FILE2, OUT_FILE, LEGAL_FILE_NAME(2));
74
          PUT (FILE2, 'A');
75
          NEW_LINE (FILE2);
76
          PUT (FILE2, 'B');
77
 
78
          CLOSE (FILE2);
79
 
80
          BEGIN
81
               OPEN (FILE2, IN_FILE, LEGAL_FILE_NAME(2));
82
          EXCEPTION
83
               WHEN USE_ERROR =>
84
                    NOT_APPLICABLE ("USE_ERROR RAISED ON OPEN WITH " &
85
                                    "WITH MODE IN_FILE");
86
                    RAISE INCOMPLETE;
87
          END;
88
 
89
          SET_INPUT (FILE2);
90
 
91
          GET (ITEM);
92
          IF ITEM /= 'A' THEN
93
               FAILED ("INCORRECT VALUE READ FROM DEFAULT FILE");
94
          END IF;
95
 
96
          SET_OUTPUT (FILE1);
97
 
98
          PUT ("THIS TEST FAILS IF THIS APPEARS IN STANDARD OUTPUT");
99
          NEW_LINE;
100
          PUT ("THIS TEST FAILS IF THIS APPEARS IN STANDARD OUTPUT");
101
 
102
          PUT (STANDARD_OUTPUT, "FIRST LINE OF INPUT");
103
          NEW_LINE (STANDARD_OUTPUT);
104
          PUT (STANDARD_OUTPUT, "SECOND LINE OF INPUT");
105
 
106
          SPECIAL_ACTION ("CHECK THAT THE CONTENTS OF THE STANDARD " &
107
                          "OUTPUT FILE ARE CORRECT");
108
          SPECIAL_ACTION ("IT SHOULD CONTAIN:");
109
          SPECIAL_ACTION ("TEST HEADER LINES");
110
          SPECIAL_ACTION ("FIRST LINE OF INPUT");
111
          SPECIAL_ACTION ("SECOND LINE OF INPUT");
112
 
113
          BEGIN
114
               DELETE (FILE1);
115
               DELETE (FILE2);
116
          EXCEPTION
117
               WHEN USE_ERROR =>
118
                    NULL;
119
          END;
120
 
121
     EXCEPTION
122
          WHEN INCOMPLETE =>
123
               NULL;
124
     END;
125
 
126
     RESULT;
127
 
128
END EE3204A;

powered by: WebSVN 2.1.0

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