You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2014/05/01 22:43:46 UTC
svn commit: r1591770 -
/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ml/neuralnet/NetworkTest.java
Author: erans
Date: Thu May 1 20:43:46 2014
New Revision: 1591770
URL: http://svn.apache.org/r1591770
Log:
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.
Modified:
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ml/neuralnet/NetworkTest.java
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ml/neuralnet/NetworkTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ml/neuralnet/NetworkTest.java?rev=1591770&r1=1591769&r2=1591770&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ml/neuralnet/NetworkTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ml/neuralnet/NetworkTest.java Thu May 1 20:43:46 2014
@@ -113,24 +113,9 @@ public class NetworkTest {
SquareNeighbourhood.VON_NEUMANN,
initArray).getNetwork();
+ // Check that the comparator provides a specific order.
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;
for (Neuron n : net.getNeurons(new Network.NeuronIdentifierComparator())) {
final long currentId = n.getIdentifier();
if (currentId < previousId) {