On 19/12/11 22:07, Glenn Adams wrote:
> If junit is run with assertions enabled (and they should always be enabled
> during junit, but are not configured that way in the standard build.xml
I wanted to do that some time ago but was facing this same
> then an assertion occurs at:
> PageBreakingAlgorithm(BreakingAlgorithm).getLineWidth(int) line: 1393
> PageBreakingAlgorithm.getLineWidth(int) line: 1084
> LayoutEngineTestCase.runTest() line: 160
> due to lineWidth being negative (-2000 in this case)
> while running the following test file:
> I can't tell readily when the assertion failure appeared in trunk,
Back then I did a git bisect and identified the commit that introduced
the regression to be rev. 1069154:
> assertions have not normally been enabled when running junit; however, it
> looks like the assertion was added at:
> *Wed Aug 26 18:50:10 2009 UTC* (2 years, 3 months ago) by *vhennebert*
> File size: 54321 byte(s)
> Merged back ChangingIPDHack branch into Trunk
> It would be nice if assertions were enabled by default when running junit;
> also, it would be useful if someone could fix the above test case so there
> are no assertions when running junit on LayoutEngineTestCase.
I haven’t had time to find out exactly what the changes are breaking.
There is something fishy in BlockContainerLM.makeChildLayoutContext
whose code doesn’t everywhere match what it is supposed to replace.
I’m tempted to revert the whole commit but I’m not sure it’s
self-contained (i.e., that related changes don’t appear in other
commits). Besides, a quick attempt introduced conflicts.
But yes, I agree that assertions should be enabled when running JUnit.