Natools

Diff
Login

Differences From Artifact [ec7ce81f68]:

To Artifact [73197627eb]:


72
73
74
75
76
77
78

79
80
81
82
83
84
85
      Separators (Report);
      Atom_Width (Report);
      Quoted_String_Escapes (Report);
      Indentation (Report);
      Newline_Formats (Report);
      Token_Separation (Report);
      Parameter_Mutators (Report);

   end All_Tests;



   -----------------------
   -- Inidividual Tests --
   -----------------------







>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
      Separators (Report);
      Atom_Width (Report);
      Quoted_String_Escapes (Report);
      Indentation (Report);
      Newline_Formats (Report);
      Token_Separation (Report);
      Parameter_Mutators (Report);
      Expression_Width (Report);
   end All_Tests;



   -----------------------
   -- Inidividual Tests --
   -----------------------
200
201
202
203
204
205
206

























































207
208
209
210
211
212
213

         Output.Check_Stream (Test);
      end;
   exception
      when Error : others => Test.Report_Exception (Error);
   end Basic_Printing;



























































   procedure Indentation (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Indentation");
      Param : Parameters
        := (Width => 16,
            Newline_At => (others => (others => False)),
            Space_At => (others => (others => False)),







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271

         Output.Check_Stream (Test);
      end;
   exception
      when Error : others => Test.Report_Exception (Error);
   end Basic_Printing;


   procedure Expression_Width (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("S-expression width");
      Param : constant Parameters
        := (Width => 6,
            Newline_At => (others => (others => True)),
            Space_At => (others => (others => False)),
            Tab_Stop => 8,
            Indentation => 0,
            Indent => Tabs_And_Spaces,
            Quoted => Single_Line,
            Token => No_Token,
            Hex_Casing => Encodings.Upper,
            Quoted_Escape => Hex_Escape,
            Char_Encoding => UTF_8,
            Fallback => Verbatim,
            Newline => LF);
   begin
      declare
         Output : aliased Test_Tools.Memory_Stream;
         P, Q : Stream_Printer (Output'Access);
         Template : constant Atom (1 .. 6) := To_Atom ("é-123");
      begin
         Output.Set_Expected (To_Atom
            ("""\xC3""" & Latin_1.LF
           & """é""" & Latin_1.LF
           & """é-""" & Latin_1.LF
           & """é-1""" & Latin_1.LF
           & """é-12""" & Latin_1.LF
           & "6:é-123" & Latin_1.LF
           & '"' & Character'Val (16#C3#) & '"' & Latin_1.LF
           & """é""" & Latin_1.LF
           & """é-""" & Latin_1.LF
           & """é-1""" & Latin_1.LF
           & "5:é-12" & Latin_1.LF
           & "6:é-123"));

         P.Set_Parameters (Param);
         Q.Set_Parameters (Param);
         Q.Set_Char_Encoding (Latin);

         for I in Template'Range loop
            P.Append_Atom (Template (Template'First .. I));
         end loop;

         P.Newline;

         for I in Template'Range loop
            Q.Append_Atom (Template (Template'First .. I));
         end loop;

         Output.Check_Stream (Test);
      end;
   exception
      when Error : others => Test.Report_Exception (Error);
   end Expression_Width;


   procedure Indentation (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Indentation");
      Param : Parameters
        := (Width => 16,
            Newline_At => (others => (others => False)),
            Space_At => (others => (others => False)),