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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3705A.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
--     FOR GET FROM A FILE, CHECK THAT IF ONLY THE FILE TERMINATOR
27
--     REMAINS TO BE READ, THEN ANY CALL TO GET FOR AN INTEGER (EVEN
28
--     WITH WIDTH = 0) RAISES END_ERROR.
29
 
30
-- HISTORY:
31
--     BCB 10/28/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
WITH TEXT_IO; USE TEXT_IO;
35
 
36
PROCEDURE CE3705A IS
37
 
38
     FILE : FILE_TYPE;
39
 
40
     INCOMPLETE : EXCEPTION;
41
 
42
     I : INTEGER;
43
 
44
     PACKAGE INT_IO IS NEW INTEGER_IO(INTEGER); USE INT_IO;
45
 
46
BEGIN
47
     TEST ("CE3705A", "FOR GET FROM A FILE, CHECK THAT IF ONLY THE " &
48
                      "FILE TERMINATOR REMAINS TO BE READ, THEN ANY " &
49
                      "CALL TO GET FOR AN INTEGER (EVEN WITH WIDTH = " &
50
                      "0) RAISES END_ERROR");
51
 
52
     BEGIN
53
          BEGIN
54
               CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
55
          EXCEPTION
56
               WHEN USE_ERROR =>
57
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
58
                                    "WITH OUT_FILE MODE");
59
                    RAISE INCOMPLETE;
60
               WHEN NAME_ERROR =>
61
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE " &
62
                                    "WITH OUT_FILE MODE");
63
                    RAISE INCOMPLETE;
64
               WHEN OTHERS =>
65
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE");
66
                    RAISE INCOMPLETE;
67
          END;
68
 
69
          PUT (FILE, 3);
70
 
71
          CLOSE (FILE);
72
 
73
          OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
74
 
75
          GET (FILE, I);
76
 
77
          BEGIN
78
               GET (FILE, I);
79
               FAILED ("END_ERROR NOT RAISED - 1");
80
          EXCEPTION
81
               WHEN END_ERROR =>
82
                    NULL;
83
               WHEN OTHERS =>
84
                    FAILED ("OTHER EXCEPTION RAISED - 1");
85
          END;
86
 
87
          BEGIN
88
               GET (FILE, I, WIDTH => 0);
89
               FAILED ("END_ERROR NOT RAISED - 2");
90
          EXCEPTION
91
               WHEN END_ERROR =>
92
                    NULL;
93
               WHEN OTHERS =>
94
                    FAILED ("OTHER EXCEPTION RAISED - 2");
95
          END;
96
 
97
          BEGIN
98
               DELETE (FILE);
99
          EXCEPTION
100
               WHEN USE_ERROR =>
101
                    NULL;
102
          END;
103
     EXCEPTION
104
          WHEN INCOMPLETE =>
105
               NULL;
106
     END;
107
 
108
     RESULT;
109
END CE3705A;

powered by: WebSVN 2.1.0

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