You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Glen Mazza <gr...@yahoo.com> on 2005/01/22 18:18:06 UTC

(housekeeping) need Compare class, TestConverter.getLogger()/.setLogger()?

Hello--three questions:

Is anyone using the get/setLogger() methods within
TestConverter?  (It is coded to use a SimpleLog by
default.)  I think these two methods are holdovers
from when we switched from the Avalon Logger--which
needed these methods--to the Commons Logger--which
doesn't.

Also, is the tools.anttasks.Compare class ready for
the CVS attic now?--I don't see it anywhere in use.

Also Java question here (probably Jeremias would
know):  Why in anttasks.RunTest.runConverter() do we
use Class.forName() & .newInstance(), etc., to
activate an instance of TestConverter rather than just
"hard-code" a TestConverter instance instead?  (We
also do this in runReference() for Fop itself--I don't
why things are done this way though.)

Thanks,
Glen


Re: (housekeeping) need Compare class, TestConverter.getLogger()/.setLogger()?

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 30.01.2005 23:10:55 Glen Mazza wrote:
<snip/>

> Just FYI, apparently (my company's W3C membership
> allows me view the XSL SG ML) the XSL SG is planning
> on having a 1.1 Test Suite (I guess) similar to what
> they already have in 1.0 [1].  I hope FOP can play a
> role in this for 1.1 as we did for 1.0--perhaps we
> will have new cases to donate. 
> 
> [1] http://www.w3.org/Style/XSL/TestSuite/

The big problem with the NIST test suite was, that it was never updated
to the Recommendation.

At any rate, they are free to use the test cases I'm currently writing
for FOP. They may not be very systematic but they helped me a lot to
identify problems while coding and they make fine regression tests.

I hope if they do write a test suite that it's publicly available from
the start so we can start using it as soon as possible.

<snip/>



Jeremias Maerki


Re: (housekeeping) need Compare class, TestConverter.getLogger()/.setLogger()?

Posted by Glen Mazza <gr...@yahoo.com>.
--- Jeremias Maerki <de...@greenmail.ch> wrote:

> 
> On 22.01.2005 18:18:06 Glen Mazza wrote:
> > Hello--three questions:
> > 
> > Is anyone using the get/setLogger() methods within
> > TestConverter?  (It is coded to use a SimpleLog by
> > default.)  I think these two methods are holdovers
> > from when we switched from the Avalon
> Logger--which
> > needed these methods--to the Commons Logger--which
> > doesn't.
> 
> Not really.
> 

It's gone.

> > Also, is the tools.anttasks.Compare class ready
> for
> > the CVS attic now?--I don't see it anywhere in
> use.
> 
> I do. examples\fo\build.xml. Although IMO this
> approach isn't really
> helping. Binary comparison of generated PDF and PS
> files fails as soon
> as there's a tiny change even if it's only an
> additional space somewhere.
> The output should be compared visually.
> 

I've "promoted" the class a bit to FileCompare.java,
and had TestConverter call it instead of implementing
its own file compare functionality.

I was unaware that the Examples directory is also used
for FOP testing, and share your general concern with
byte-by-byte testing.

Just FYI, apparently (my company's W3C membership
allows me view the XSL SG ML) the XSL SG is planning
on having a 1.1 Test Suite (I guess) similar to what
they already have in 1.0 [1].  I hope FOP can play a
role in this for 1.1 as we did for 1.0--perhaps we
will have new cases to donate. 

[1] http://www.w3.org/Style/XSL/TestSuite/


> > Also Java question here (probably Jeremias would
> > know):  Why in anttasks.RunTest.runConverter() do
> we
> > use Class.forName() & .newInstance(), etc., to
> > activate an instance of TestConverter rather than
> just
> > "hard-code" a TestConverter instance instead?  (We
> > also do this in runReference() for Fop itself--I
> don't
> > why things are done this way though.)
> 
> To establish a different class loader for the test
> runs. If you
> hard-coded this the TestConverter wouldn't find FOP
> that was set up in a
> separate class loader.
> 

I understand now--thanks.  Just added a comment in TC
to that effect should others also be curious about
this.

Thanks,
Glen


Re: (housekeeping) need Compare class, TestConverter.getLogger()/.setLogger()?

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 22.01.2005 18:18:06 Glen Mazza wrote:
> Hello--three questions:
> 
> Is anyone using the get/setLogger() methods within
> TestConverter?  (It is coded to use a SimpleLog by
> default.)  I think these two methods are holdovers
> from when we switched from the Avalon Logger--which
> needed these methods--to the Commons Logger--which
> doesn't.

Not really.

> Also, is the tools.anttasks.Compare class ready for
> the CVS attic now?--I don't see it anywhere in use.

I do. examples\fo\build.xml. Although IMO this approach isn't really
helping. Binary comparison of generated PDF and PS files fails as soon
as there's a tiny change even if it's only an additional space somewhere.
The output should be compared visually.

> Also Java question here (probably Jeremias would
> know):  Why in anttasks.RunTest.runConverter() do we
> use Class.forName() & .newInstance(), etc., to
> activate an instance of TestConverter rather than just
> "hard-code" a TestConverter instance instead?  (We
> also do this in runReference() for Fop itself--I don't
> why things are done this way though.)

To establish a different class loader for the test runs. If you
hard-coded this the TestConverter wouldn't find FOP that was set up in a
separate class loader.

That's pretty much the same mechanism I used for my FO processing API to
allow for different FO processors in the same VM at the same time.


Jeremias Maerki