On 11/08/2003 9:29, "Stephan Michels" <[EMAIL PROTECTED]> wrote:
> On Sat, 9 Aug 2003, Mark Leicester wrote: > >> Do you have plans for serializer test cases, and if so does this code fit >> the bill? I thought I should post it to you and the list for comment before >> I submit it as a patch. > Code is always welcome. I havn't written a Serializer testcase until now, > because I find it difficult to test binary data. In my POV you must > generate the expected output with a different tool than the component you > want to test. In the case of binary data, it is not that easy. Quite right. The chickens and the eggs. In my case (with the XMidiGenerator and XMidiSerializer) I am trying to confirm that a "round trip" has been successful, so for me this test is ideal. After generating XML *from* my binary file I subsequently serialize to a binary file which I hope is exactly the same as the original binary file. Also, I find that once I have finally succeeded in getting some code to work it's good to have a test to confirm that if I make changes to it later, my code is *still* working! So indeed, even if the expected output may have been generated with the component I want to test, at least I can tell if the component continues to behave consistently after I make changes. > But anyway, I applied that patch. Thanks! Regards, Mark
