Overview
Comment: | s_expressions-atom_buffers-tests: add a test for the new stream interface |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
3c45cf38af3b1c5f3d0f37e881887aa5 |
User & Date: | nat on 2014-08-31 14:45:34 |
Other Links: | manifest | tags |
Context
2014-09-01
| ||
18:29 | s_expressions-atom_buffers: fix stream read check-in: 0e2f32ef01 user: nat tags: trunk | |
2014-08-31
| ||
14:45 | s_expressions-atom_buffers-tests: add a test for the new stream interface check-in: 3c45cf38af user: nat tags: trunk | |
2014-08-30
| ||
20:33 | s_expressions-atom_buffers: add a stream interface to atom buffers check-in: a209bfec77 user: nat tags: trunk | |
Changes
Modified tests/natools-s_expressions-atom_buffers-tests.adb from [31a69a9e16] to [e5c3953dd9].
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | + | Test_Preallocate (Report); Test_Query (Report); Test_Query_Null (Report); Test_Reset (Report); Test_Reverse_Append (Report); Test_Invert (Report); Test_Empty_Append (Report); Test_Stream_Interface (Report); end All_Tests; ---------------------- -- Individual Tests -- ---------------------- |
︙ | |||
460 461 462 463 464 465 466 467 | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | + + + + + + + + + + + + + + + + + + + + + + + | 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; procedure Test_Stream_Interface (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Stream interface"); begin declare Buffer : Atom_Buffer; Part_1 : constant Atom := To_Atom ("0123456789"); Part_2 : constant Atom := To_Atom ("ABCDEF"); Data : Atom (1 .. 10); Last : Offset; begin Buffer.Write (Part_1 & Part_2); Buffer.Read (Data, Last); Test_Tools.Test_Atom (Test, Part_1, Data); Test_Tools.Test_Atom (Test, Part_2, Buffer.Data); Buffer.Read (Data, Last); Test_Tools.Test_Atom (Test, Part_2, Data (Data'First .. Last)); Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data); end; exception when Error : others => Test.Report_Exception (Error); end Test_Stream_Interface; end Natools.S_Expressions.Atom_Buffers.Tests; |
Modified tests/natools-s_expressions-atom_buffers-tests.ads from [3c624f0566] to [9b1277e30c].
︙ | |||
33 34 35 36 37 38 39 40 41 | 33 34 35 36 37 38 39 40 41 42 | + | 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); procedure Test_Stream_Interface (Report : in out NT.Reporter'Class); end Natools.S_Expressions.Atom_Buffers.Tests; |