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/] [ce3108b.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
-- CE3108B.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 NAME RETURNED BY THE NAME FUNCTION CAN BE USED
27
--     IN A SUBSEQUENT OPEN.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
31
--     TEXT FILES.
32
 
33
-- HISTORY:
34
--     DLD 08/11/82
35
--     SPS 11/09/82
36
--     JBG 03/24/83
37
--     EG  05/16/85
38
--     GMT 08/17/87  REMOVED UNNECESSARY CODE AND ADDED A CHECK FOR
39
--                   USE_ERROR ON DELETE.
40
 
41
WITH TEXT_IO; USE TEXT_IO;
42
WITH REPORT; USE REPORT;
43
 
44
PROCEDURE CE3108B IS
45
 
46
     TYPE ACC_STR IS ACCESS STRING;
47
 
48
     TXT_FILE      : FILE_TYPE;
49
     TXT_FILE_NAME : ACC_STR;
50
     DIR_FILE_NAME : ACC_STR;
51
     VAR           : STRING(1..2);
52
     LAST          : INTEGER;
53
     INCOMPLETE    : EXCEPTION;
54
 
55
BEGIN
56
 
57
     TEST ("CE3108B", "CHECK THAT THE NAME RETURNED BY THE NAME-" &
58
                      "FUNCTION CAN BE USED IN A SUBSEQUENT OPEN");
59
 
60
     -- CREATE TEST FILES
61
 
62
     BEGIN
63
          BEGIN
64
               CREATE (TXT_FILE, OUT_FILE, LEGAL_FILE_NAME);
65
          EXCEPTION
66
               WHEN NAME_ERROR =>
67
                    NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE - 1");
68
                    RAISE INCOMPLETE;
69
               WHEN USE_ERROR =>
70
                    NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE - 2");
71
                    RAISE INCOMPLETE;
72
          END;
73
 
74
          BEGIN
75
               PUT (TXT_FILE, "14");
76
               TXT_FILE_NAME := NEW STRING'(NAME (TXT_FILE));
77
               CLOSE (TXT_FILE);
78
 
79
               -- ATTEMPT TO RE-OPEN TEXT TEST FILE USING RETURNED NAME
80
               -- VALUE
81
 
82
               BEGIN
83
                    OPEN (TXT_FILE, IN_FILE, TXT_FILE_NAME.ALL);
84
               EXCEPTION
85
                    WHEN USE_ERROR =>
86
                         NOT_APPLICABLE ("USE_ERROR ON RE-OPEN - 3");
87
                         RAISE INCOMPLETE;
88
               END;
89
 
90
               GET (TXT_FILE, VAR);
91
               IF VAR /= "14" THEN
92
                    FAILED ("WRONG DATA RETURNED FROM READ - 4");
93
               END IF;
94
 
95
               -- CLOSE AND DELETE TEST FILES
96
 
97
               BEGIN
98
                    DELETE (TXT_FILE);
99
               EXCEPTION
100
                    WHEN USE_ERROR =>
101
                         NULL;
102
               END;
103
          END;
104
     EXCEPTION
105
          WHEN INCOMPLETE =>
106
               NULL;
107
     END;
108
 
109
     RESULT;
110
 
111
END CE3108B;

powered by: WebSVN 2.1.0

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