Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 11026 invoked by uid 500); 11 Aug 2003 14:07:06 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 10934 invoked from network); 11 Aug 2003 14:07:05 -0000 Received: from unknown (HELO mailserver.metering.co.nz) (202.36.204.15) by daedalus.apache.org with SMTP; 11 Aug 2003 14:07:05 -0000 Received: from [192.168.8.14] (pc-62-30-110-122-ed.blueyonder.co.uk [62.30.110.122]) by mailserver.metering.co.nz with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id P5KHG358; Tue, 12 Aug 2003 02:07:03 +1200 User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Mon, 11 Aug 2003 15:06:59 +0100 Subject: Re: AbstractSerializerTestCase From: Mark Leicester To: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 11/08/2003 9:29, "Stephan Michels" 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