vss_24.0.0_b4d0be7c/testsuite/html/stdout_text_streams.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--
--  Copyright (C) 2022-2023, AdaCore
--
--  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
--

with Ada.Wide_Wide_Text_IO;

package body Stdout_Text_Streams is

   --------------
   -- New_Line --
   --------------

   overriding procedure New_Line
     (Self    : in out Output_Text_Stream;
      Success : in out Boolean) is
   begin
      raise Program_Error;
   end New_Line;

   ---------
   -- Put --
   ---------

   overriding procedure Put
     (Self    : in out Output_Text_Stream;
      Item    : VSS.Characters.Virtual_Character;
      Success : in out Boolean) is
   begin
      Ada.Wide_Wide_Text_IO.Put (Wide_Wide_Character (Item));

   exception
      when others =>
         Self.Message := "exception raised by IO";
         Success      := False;
   end Put;

   ---------
   -- Put --
   ---------

   overriding procedure Put
     (Self    : in out Output_Text_Stream;
      Item    : VSS.Strings.Virtual_String;
      Success : in out Boolean) is
   begin
      raise Program_Error;
   end Put;

   --------------
   -- Put_Line --
   --------------

   overriding procedure Put_Line
     (Self    : in out Output_Text_Stream;
      Item    : VSS.Strings.Virtual_String;
      Success : in out Boolean) is
   begin
      raise Program_Error;
   end Put_Line;

end Stdout_Text_Streams;