Manuel Mall wrote:

Chris,

Hi Manuel,


On Thu, 4 Aug 2005 09:31 pm, [EMAIL PROTECTED] wrote:
...

------- Additional Comments From [EMAIL PROTECTED]

...

I have added some checks to make the tests a little more effective at
detecting regressions. I would be grateful if you could have a go at
this yourself next time. If you're not sure how to do this, just ask
on fop-dev.

I was thinking myself that I needed to do something about adding "stuff" to the <checks> section but have no real idea where to start. I assume these checks are against the internal area tree? Any way, in the moment this is still a big black hole for me and I would very much appreciate any helpful suggestions how I could go best about to achieve some enlightenment in that area.

The checks are actually against the Area Tree Output. You can generate it and see what it looks like for any fo by running the following command line:

fop foo.fo -at foo.xml

There are 2 basic checks you can do (I could be wrong; I'm not the expect here):

1) <true> check, useful for checking the presence/absence of an element or attribute in this XML output. It has a single attribute xpath="" which is just an xpath expression which can select a node in the XML output.

2) <eval> check, which grabs the value of a attribute specified by the xpath attribute and checks it matches the expected value specified in the expected attribute.

As an example I added some checks to your font-size tests to see that a medium font was in fact 12pt. Internally all FOP's measurements are in milli-pt, so the check actually looks for the value "12000"

I hope this gives you the basic idea,

Chris


Reply via email to