Index: tests/natools-s_expressions-atom_buffers-tests.adb ================================================================== --- tests/natools-s_expressions-atom_buffers-tests.adb +++ tests/natools-s_expressions-atom_buffers-tests.adb @@ -30,10 +30,11 @@ Test_Query (Report); Test_Query_Null (Report); Test_Reset (Report); Test_Reverse_Append (Report); Test_Invert (Report); + Test_Empty_Append (Report); end All_Tests; ---------------------- @@ -447,6 +448,20 @@ 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; Index: tests/natools-s_expressions-atom_buffers-tests.ads ================================================================== --- tests/natools-s_expressions-atom_buffers-tests.ads +++ tests/natools-s_expressions-atom_buffers-tests.ads @@ -27,14 +27,15 @@ 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;