Changeset 8019 for trunk/sources/HeuristicLab.Tests
- Timestamp:
- 06/17/12 15:05:11 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs
r7259 r8019 119 119 parent2 = new IntegerVector(new int[] { 4, 1, 3, 2, 8 }); 120 120 expected = new IntegerVector(new int[] { 2, 2, 3, 5, 8 }); 121 actual = DiscreteCrossover.Apply(random, parent1, parent2);121 actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 })); 122 122 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected)); 123 123 … … 129 129 exceptionFired = false; 130 130 try { 131 actual = DiscreteCrossover.Apply(random, parent1, parent2);131 actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 })); 132 132 } 133 133 catch (System.ArgumentException) { -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs
r7259 r8019 87 87 TestRandom random = new TestRandom(); 88 88 IntegerVector parent, expected; 89 Int Value min, max;89 IntMatrix bounds = new IntMatrix(1, 2); 90 90 // The following test is not based on published examples 91 91 random.Reset(); … … 93 93 parent = new IntegerVector(new int[] { 2, 2, 3, 5, 1 }); 94 94 expected = new IntegerVector(new int[] { 2, 2, 3, 3, 1 }); 95 min = new IntValue(2);96 max = new IntValue(7);97 UniformOnePositionManipulator.Apply(random, parent, min, max);95 bounds[0, 0] = 2; 96 bounds[0, 1] = 7; 97 UniformOnePositionManipulator.Apply(random, parent, bounds); 98 98 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent)); 99 99 }
Note: See TracChangeset
for help on using the changeset viewer.