ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject IntrospectionHelperTest failed on OS X
Date Thu, 30 Sep 2004 09:35:19 GMT
Hi,

I'm not sure whether I've run the tests on my Mac after
testGetExtensionPoints has been added and it just fails now after I
upgraded Java or whether it has always been failing.

The test depends on the implementation of reflection - in particular
on the order returned by getMethods.

We had three valid adder methods:

add(Number)
addConfigured(Map)
addConfigured(Hashtable)

and the main point the test wants to assert is that the Hashtable arg
version comes before the Map arg version in the list returned by
getExtensionPoints.  This works fine.  But the test also assumes that
add(Number) comes first, while the relative order in reality is
undefined.  There are three valid orders getExtensionPoints may
produce:

add(Number)
addConfigured(Hashtable)
addConfigured(Map)

addConfigured(Hashtable)
add(Number)
addConfigured(Map)

addConfigured(Hashtable)
addConfigured(Map)
add(Number)

depending on whether add(Number) is returned first, second or third by
(and whether add(Hashtable) comes before or after addConfigured(Map))
the reflection implementation.

Instead of trying to find which of the three results we are looking
at, I simply removed add(Number) completely from the test - feel free
to improve it 8-)

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message