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:
parent
81182700e8
commit
26581ccd66
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue