Natools

Check-in [22bbf2ef8f]
Login
Overview
Comment:s_expressions-atom_buffers-tests: add a minimal test to show empty append bug
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 22bbf2ef8f6cb364d5fbb89fd0f701e1b56fa612
User & Date: nat on 2014-03-30 12:31:30
Other Links: manifest | tags
Context
2014-03-31
19:09
s_expressions-atom_buffers: fix exception when appending an empty atom to an empty buffer check-in: a4d12bf348 user: nat tags: trunk
2014-03-30
12:31
s_expressions-atom_buffers-tests: add a minimal test to show empty append bug check-in: 22bbf2ef8f user: nat tags: trunk
2014-03-29
17:02
s_expressions-parsers-tests: add tests to complete coverage of the new parser check-in: a5c83aef9c user: nat tags: trunk
Changes

Modified tests/natools-s_expressions-atom_buffers-tests.adb from [b20f1beb30] to [3b89ddc3f5].

28
29
30
31
32
33
34

35
36
37
38
39
40
41
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42







+







      Test_Octet_Append (Report);
      Test_Preallocate (Report);
      Test_Query (Report);
      Test_Query_Null (Report);
      Test_Reset (Report);
      Test_Reverse_Append (Report);
      Test_Invert (Report);
      Test_Empty_Append (Report);
   end All_Tests;



   ----------------------
   -- Individual Tests --
   ----------------------
445
446
447
448
449
450
451














452
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467







+
+
+
+
+
+
+
+
+
+
+
+
+
+


         Test_Tools.Test_Atom (Report, Name, Expected, Buffer.Data);
      end;
   exception
      when Error : others => Report.Report_Exception (Name, Error);
   end Test_Reverse_Append;


   procedure Test_Empty_Append (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Empty append on empty buffer");
   begin
      declare
         Buffer : Atom_Buffer;
      begin
         Buffer.Append (Null_Atom);
         Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data);
      end;
   exception
      when Error : others => Test.Report_Exception (Error);
   end Test_Empty_Append;

end Natools.S_Expressions.Atom_Buffers.Tests;

Modified tests/natools-s_expressions-atom_buffers-tests.ads from [72b5629fff] to [3c624f0566].

25
26
27
28
29
30
31

32
33
34
35
36
37
38
39
40
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41







+









   pragma Preelaborate (Tests);

   package NT renames Natools.Tests;

   procedure All_Tests (Report : in out NT.Reporter'Class);

   procedure Test_Block_Append (Report : in out NT.Reporter'Class);
   procedure Test_Empty_Append (Report : in out NT.Reporter'Class);
   procedure Test_Octet_Append (Report : in out NT.Reporter'Class);
   procedure Test_Invert (Report : in out NT.Reporter'Class);
   procedure Test_Preallocate (Report : in out NT.Reporter'Class);
   procedure Test_Query (Report : in out NT.Reporter'Class);
   procedure Test_Query_Null (Report : in out NT.Reporter'Class);
   procedure Test_Reset (Report : in out NT.Reporter'Class);
   procedure Test_Reverse_Append (Report : in out NT.Reporter'Class);

end Natools.S_Expressions.Atom_Buffers.Tests;