Removed test based on the assumption that iterating over a

"ConcurrentHashMap" would always provide its elements in a
random order. This seemed to be the case up to Java 7 but
not always in Java 8.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1591770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2014-05-01 20:43:46 +00:00
parent 81182700e8
commit 26581ccd66
1 changed files with 2 additions and 17 deletions

View File

@ -113,24 +113,9 @@ public class NetworkTest {
SquareNeighbourhood.VON_NEUMANN,
initArray).getNetwork();
boolean isUnspecifiedOrder = false;
// Check that the default iterator returns the neurons
// in an unspecified order.
long previousId = Long.MIN_VALUE;
for (Neuron n : net) {
final long currentId = n.getIdentifier();
if (currentId < previousId) {
isUnspecifiedOrder = true;
break;
}
previousId = currentId;
}
Assert.assertTrue(isUnspecifiedOrder);
// Check that the comparator provides a specific order.
isUnspecifiedOrder = false;
previousId = Long.MIN_VALUE;
boolean isUnspecifiedOrder = false;
long previousId = Long.MIN_VALUE;
for (Neuron n : net.getNeurons(new Network.NeuronIdentifierComparator())) {
final long currentId = n.getIdentifier();
if (currentId < previousId) {