OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [ce/] [ce3401a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CE3401A.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 FORMAL PARAMETERS OF EACH COLUMN, LINE, AND
27
--     PAGE OPERATION ARE NAMED CORRECTLY.
28
 
29
-- HISTORY:
30
--     JET 08/17/88  CREATED ORIGINAL TEST.
31
 
32
WITH REPORT; USE REPORT;
33
WITH TEXT_IO; USE TEXT_IO;
34
PROCEDURE CE3401A IS
35
 
36
     FIN, FOUT : FILE_TYPE;
37
     B : BOOLEAN;
38
     C : COUNT;
39
     FILE_OK : BOOLEAN := FALSE;
40
 
41
BEGIN
42
     TEST ("CE3401A", "CHECK THAT THE FORMAL PARAMETERS OF EACH " &
43
                      "COLUMN, LINE, AND PAGE OPERATION ARE NAMED " &
44
                      "CORRECTLY");
45
 
46
     BEGIN
47
          CREATE(FOUT, OUT_FILE, LEGAL_FILE_NAME);
48
          FILE_OK := TRUE;
49
     EXCEPTION
50
          WHEN OTHERS =>
51
               NOT_APPLICABLE("OUTPUT FILE COULD NOT BE CREATED");
52
     END;
53
 
54
     IF FILE_OK THEN
55
          NEW_LINE(FILE => FOUT, SPACING => 1);
56
          NEW_PAGE(FILE => FOUT);
57
          SET_COL(FILE => FOUT, TO => 1);
58
          SET_LINE(FILE => FOUT, TO => 1);
59
          C := COL(FILE => FOUT);
60
          C := LINE(FILE => FOUT);
61
          C := PAGE(FILE => FOUT);
62
 
63
          NEW_PAGE(FOUT);
64
 
65
          BEGIN
66
               CLOSE(FOUT);
67
          EXCEPTION
68
               WHEN OTHERS =>
69
                    FAILED("OUTPUT FILE COULD NOT BE CLOSED");
70
                    FILE_OK := FALSE;
71
          END;
72
     END IF;
73
 
74
     IF FILE_OK THEN
75
          BEGIN
76
               OPEN(FIN, IN_FILE, LEGAL_FILE_NAME);
77
          EXCEPTION
78
               WHEN OTHERS =>
79
                    FAILED("INPUT FILE COULD NOT BE OPENED");
80
                    FILE_OK := FALSE;
81
          END;
82
     END IF;
83
 
84
     IF FILE_OK THEN
85
          SKIP_LINE(FILE => FIN, SPACING => 1);
86
          SKIP_PAGE(FILE => FIN);
87
          B := END_OF_LINE(FILE => FIN);
88
          B := END_OF_PAGE(FILE => FIN);
89
          B := END_OF_FILE(FILE => FIN);
90
 
91
          BEGIN
92
               DELETE(FIN);
93
          EXCEPTION
94
               WHEN USE_ERROR =>
95
                    COMMENT("FILE COULD NOT BE DELETED");
96
               WHEN OTHERS =>
97
                    FAILED("UNEXPECTED ERROR AT DELETION");
98
          END;
99
     END IF;
100
 
101
     RESULT;
102
EXCEPTION
103
     WHEN OTHERS =>
104
          FAILED("UNEXPECTED EXCEPTION RAISED");
105
END CE3401A;

powered by: WebSVN 2.1.0

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