- Timestamp:
- 03/16/10 11:37:25 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Auxiliary.cs
r3053 r3061 20 20 #endregion 21 21 22 using HeuristicLab.Data;23 22 using HeuristicLab.Common; 23 using HeuristicLab.Encodings.IntegerVectorEncoding; 24 24 25 25 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests { 26 26 public static class Auxiliary { 27 public static bool Int VectorIsEqualByPosition(IntArray p1, IntArrayp2) {27 public static bool IntegerVectorIsEqualByPosition(IntegerVector p1, IntegerVector p2) { 28 28 bool equal = (p1.Length == p2.Length); 29 29 if (equal) { -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs
r3059 r3061 76 76 exceptionFired = false; 77 77 try { 78 Int Arrayactual;78 IntegerVector actual; 79 79 actual = target.Cross(random, parents); 80 80 } catch (System.ArgumentException) { … … 99 99 expected = new IntegerVector(new int[] { 2, 2, 3, 5, 8 }); 100 100 actual = DiscreteCrossover.Apply(random, parent1, parent2); 101 Assert.IsTrue(Auxiliary.Int VectorIsEqualByPosition(actual, expected));101 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected)); 102 102 103 103 // The following test is not based on published examples -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
r3059 r3061 111 111 expected = new IntegerVector(new int[] { 2, 2, 3, 2, 8 }); 112 112 actual = SinglePointCrossover.Apply(random, parent1, parent2); 113 Assert.IsTrue(Auxiliary.Int VectorIsEqualByPosition(actual, expected));113 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected)); 114 114 // The following test is not based on published examples 115 115 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs
r3059 r3061 95 95 max = new IntValue(7); 96 96 UniformOnePositionManipulator.Apply(random, parent, min, max); 97 Assert.IsTrue(Auxiliary.Int VectorIsEqualByPosition(expected, parent));97 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent)); 98 98 } 99 99
Note: See TracChangeset
for help on using the changeset viewer.