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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3705E.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 DATA_ERROR, NOT END_ERROR, IS RAISED WHEN FEWER THAN
27
--     WIDTH CHARACTERS REMAIN IN THE FILE, AND THE REMAINING CHARACTERS
28
--     SATISFY THE SYNTAX FOR A REAL LITERAL.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
32
--     TEXT FILES.
33
 
34
-- HISTORY:
35
--     JLH 07/20/88  CREATED ORIGINAL TEST.
36
 
37
WITH REPORT; USE REPORT;
38
WITH TEXT_IO; USE TEXT_IO;
39
 
40
PROCEDURE CE3705E IS
41
 
42
     PACKAGE IIO IS NEW INTEGER_IO (INTEGER);
43
     USE IIO;
44
 
45
     FILE : FILE_TYPE;
46
     ITEM : INTEGER;
47
     INCOMPLETE : EXCEPTION;
48
 
49
BEGIN
50
 
51
     TEST ("CE3705E", "CHECK THAT DATA_ERROR, NOT END_ERROR, IS " &
52
                      "RAISED WHEN FEWER THAN WIDTH CHARACTERS " &
53
                      "REMAIN IN THE FILE, AND THE REMAINING " &
54
                      "CHARACTERS SATISFY THE SYNTAX FOR A REAL " &
55
                      "LITERAL");
56
 
57
     BEGIN
58
 
59
          BEGIN
60
               CREATE (FILE, OUT_FILE, LEGAL_FILE_NAME);
61
          EXCEPTION
62
               WHEN USE_ERROR =>
63
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE " &
64
                                    "WITH MODE OUT_FILE");
65
                    RAISE INCOMPLETE;
66
               WHEN NAME_ERROR =>
67
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE " &
68
                                    "WITH MODE OUT_FILE");
69
                    RAISE INCOMPLETE;
70
               WHEN OTHERS =>
71
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE");
72
                    RAISE INCOMPLETE;
73
          END;
74
 
75
          PUT (FILE, "16#FFF#");
76
          NEW_LINE (FILE);
77
          PUT (FILE, "3.14159_26");
78
 
79
          CLOSE (FILE);
80
 
81
          BEGIN
82
               OPEN (FILE, IN_FILE, LEGAL_FILE_NAME);
83
          EXCEPTION
84
               WHEN USE_ERROR =>
85
                    NOT_APPLICABLE ("USE_ERROR RAISED ON OPEN " &
86
                                    "WITH MODE IN_FILE");
87
                    RAISE INCOMPLETE;
88
               WHEN OTHERS =>
89
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON OPEN");
90
                    RAISE INCOMPLETE;
91
          END;
92
 
93
          GET (FILE, ITEM);
94
          IF ITEM /= 4095 THEN
95
               FAILED ("INCORRECT VALUE READ");
96
          END IF;
97
 
98
          BEGIN
99
               GET (FILE, ITEM, WIDTH => 11);
100
               FAILED ("DATA_ERROR NOT RAISED");
101
          EXCEPTION
102
               WHEN END_ERROR =>
103
                    FAILED ("END_ERROR INSTEAD OF DATA_ERROR RAISED");
104
               WHEN DATA_ERROR =>
105
                    NULL;
106
               WHEN OTHERS =>
107
                    FAILED ("UNEXPECTED EXCEPTION RAISED ON GET");
108
          END;
109
 
110
          BEGIN
111
               DELETE (FILE);
112
          EXCEPTION
113
               WHEN USE_ERROR =>
114
                    NULL;
115
          END;
116
 
117
     EXCEPTION
118
          WHEN INCOMPLETE =>
119
               NULL;
120
     END;
121
 
122
     RESULT;
123
 
124
END CE3705E;

powered by: WebSVN 2.1.0

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