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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CE3606A.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 PUT_LINE WILL OUTPUT A LINE TERMINATOR WHEN THE
27
--     STRING PARAMETER IS NULL.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH
31
--     SUPPORT TEMPORARY TEXT FILES.
32
 
33
-- HISTORY:
34
--     SPS 09/02/82
35
--     JBG 02/22/84  CHANGED TO .ADA TEST
36
--     RJW 11/04/86  REVISED TEST TO OUTPUT A NON_APPLICABLE
37
--                   RESULT WHEN FILES ARE NOT SUPPORTED.
38
--     DWC 09/09/87  REMOVED UNNECESSARY CODE AND CORRECTED
39
--                   EXCEPTION HANDLING.
40
 
41
WITH REPORT; USE REPORT;
42
WITH TEXT_IO; USE TEXT_IO;
43
WITH CHECK_FILE;
44
PROCEDURE CE3606A IS
45
     INCOMPLETE : EXCEPTION;
46
 
47
BEGIN
48
 
49
     TEST ("CE3606A", "PUT_LINE PUTS LINE TERMINATOR WHEN STRING " &
50
                      "IS NULL");
51
 
52
     DECLARE
53
          FT : FILE_TYPE;
54
          NS1 : STRING (1 .. 0);
55
          NS2 : STRING (3 .. 1);
56
          LC : POSITIVE_COUNT := 1;
57
     BEGIN
58
 
59
          BEGIN
60
               CREATE (FT);
61
          EXCEPTION
62
               WHEN USE_ERROR =>
63
                    NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " &
64
                                    "FOR TEMP FILES WITH OUT_FILE " &
65
                                    "MODE");
66
                    RAISE INCOMPLETE;
67
          END;
68
 
69
          PUT_LINE (FT, NS1);
70
          IF LINE (FT) /= LC + 1 THEN
71
               FAILED ("PUT_LINE OF NULL STRING 1; LINE " &
72
                       "COUNT WAS" & COUNT'IMAGE(LINE(FT)));
73
          END IF;
74
 
75
          PUT_LINE (FT, NS2);
76
          IF LINE (FT) /= LC + 2 THEN
77
               FAILED ("PUT_LINE OF NULL STRING 2; LINE " &
78
                       "COUNT WAS" & COUNT'IMAGE(LINE(FT)));
79
          END IF;
80
 
81
          CHECK_FILE (FT, "##@%");
82
 
83
          CLOSE (FT);
84
     EXCEPTION
85
          WHEN INCOMPLETE =>
86
               NULL;
87
     END;
88
 
89
     RESULT;
90
 
91
END CE3606A;

powered by: WebSVN 2.1.0

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