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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- EE3402B.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 NEW_LINE HAS AN OPTIONAL SPACING PARAMETER WITH
27
--     DEFAULT VALUE ONE, AND CHECK THAT NEW_LINE OPERATES ON THE
28
--     CURRENT DEFAULT OUTPUT FILE IF NO FILE IS SPECIFIED.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
32
--     TEXT FILES.
33
 
34
-- PASS/FAIL CRITERIA:
35
--     THIS TEST IS PASSED IF IT EXECUTES, PRINTS TENTATIVELY PASSED,
36
--     AND THE CONTENTS OF THE STANDARD OUTPUT FILE ARE CORRECT.
37
 
38
-- HISTORY:
39
--     ABW 08/26/82
40
--     SPS 09/16/82
41
--     TBN 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
42
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
43
--     DWC 08/19/87  ADDED SPECIAL ACTION FUNCTION AND REMOVED
44
--                   EXCEPTION HANDLERS.  CHANGED TO AN E TEST.
45
 
46
WITH REPORT;
47
USE REPORT;
48
WITH TEXT_IO;
49
USE TEXT_IO;
50
WITH CHECK_FILE;
51
 
52
PROCEDURE EE3402B IS
53
 
54
     INCOMPLETE : EXCEPTION;
55
     FILE, FILE_OUT : FILE_TYPE;
56
     SPAC : CONSTANT POSITIVE_COUNT := POSITIVE_COUNT (IDENT_INT(4));
57
     TWO : CONSTANT POSITIVE_COUNT := POSITIVE_COUNT (IDENT_INT(2));
58
     FOUR : CONSTANT POSITIVE_COUNT := POSITIVE_COUNT (IDENT_INT(4));
59
     CUR_LINE : COUNT;
60
 
61
BEGIN
62
 
63
     TEST ("EE3402B", "CHECK THAT NEW_LINE HAS AN OPTIONAL " &
64
                      "SPACING PARAMETER WITH DEFAULT VALUE ONE, " &
65
                      "AND CHECK THAT NEW_LINE OPERATES ON THE " &
66
                      "CURRENT DEFAULT OUTPUT FILE IF NO FILE IS " &
67
                      "SPECIFIED.");
68
 
69
     BEGIN
70
          CREATE (FILE);
71
     EXCEPTION
72
          WHEN USE_ERROR =>
73
               NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
74
                               "WITH OUT_FILE MODE");
75
               RAISE INCOMPLETE;
76
          WHEN OTHERS =>
77
               FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT CREATE - 1");
78
               RAISE INCOMPLETE;
79
     END;
80
 
81
     CREATE (FILE_OUT);
82
 
83
     SPECIAL_ACTION ("CHECK OUTPUT FOR FOUR BLANK LINES");
84
 
85
     NEW_LINE (FILE);
86
     IF LINE (FILE) /= TWO THEN
87
          FAILED ("SPACING DEFAULT NOT ONE");
88
     END IF;
89
 
90
     SPECIAL_ACTION ("FOUR BLANK LINES SHOULD FOLLOW THIS COMMENT");
91
     CUR_LINE := LINE (STANDARD_OUTPUT);
92
     NEW_LINE (SPAC);
93
     IF LINE (STANDARD_OUTPUT) /= CUR_LINE + 4 THEN
94
          FAILED ("FILE DEFAULT NOT CORRECT FOR STANDARD_OUTPUT");
95
     END IF;
96
 
97
     SET_OUTPUT (FILE_OUT);
98
     NEW_LINE (SPAC);
99
     IF LINE (CURRENT_OUTPUT) /= FOUR + 1 THEN
100
          FAILED ("FILE DEFAULT NOT CORRECT FOR CURRENT_OUTPUT");
101
     END IF;
102
 
103
     SET_OUTPUT (STANDARD_OUTPUT);      -- RESET STANDARD OUTPUT
104
     COMMENT ("CHECKING FILE");
105
     CHECK_FILE (FILE, "#@%");
106
     COMMENT ("CHECKING FILE_OUT");
107
     CHECK_FILE (FILE_OUT, "####@%");
108
 
109
     CLOSE (FILE);
110
     CLOSE (FILE_OUT);
111
 
112
     RESULT;
113
 
114
EXCEPTION
115
     WHEN INCOMPLETE =>
116
          RESULT;
117
 
118
END EE3402B;

powered by: WebSVN 2.1.0

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