Depends on what is easier to fix. I'm certainly not for changing to a
less efficient implementation just for the sake of the unit tests, so
if the DiffUtil could be changed, that would be great. IMO, our unit
tests are too brittle anyway, so a diffutil that would be a little bit
smarter would be very nice.
Eelco
On 3/28/07, Janne Hietamäki <[EMAIL PROTECTED]> wrote:
On Mar 28, 2007, at 11:23 AM, Al Maw wrote:
>
> Other than that, things I've checked are:
> - Tests all pass.
Hmm. I tried to run the tests, and some of them are failing because
the outputted markup has attributes in wrong order. Tests pass ok
when I use JDK 1.5.0, but with 1.4.2 or 1.6.0 (on OS X) some of them
fail.
This is really a old feature, but may be we should finally find a
decent fix for it. ValueMap/AttributeMap is based on HashMap which
causes the attributes are not in predicted order. SortedMap is one
option, but could we find a more efficient one? Attribute order
really matters only when testing, so modifying the diffutil could be
another option..
What do you think?
Here's one example:
testDetachPageAjaxRequest(wicket.ComponentTest) Time elapsed: 0.008
sec <<< FAILURE!
junit.framework.ComparisonFailure: wicket/
TestDetachPageExpectedResult.html expected:<...wicket:id="comp"
onclick="var wcall=wicketAjaxGet('?wicket:interface=:
0:comp::IBehaviorListener:0', function() { }, function() { });"
id="comp0...> but was:<...id="comp0" onc
lick="var wcall=wicketAjaxGet('?wicket:interface=:
0:comp::IBehaviorListener:0', function() { }, function() { });"
wicket:id="comp...>
at junit.framework.Assert.assertEquals(Assert.java:81)
at wicket.util.diff.DiffUtil.validatePage(DiffUtil.java:106)
Janne