- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Auxiliary.cs
r3061 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Common;23 22 using HeuristicLab.Encodings.BinaryVectorEncoding; 24 23 -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/NPointCrossoverTest.cs
r3742 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Core; 23 using HeuristicLab.Data; 22 24 using HeuristicLab.Encodings.BinaryVectorEncoding; 23 25 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 using HeuristicLab.Common;25 using HeuristicLab.Core;26 using HeuristicLab.Data;27 using HeuristicLab.Parameters;28 26 29 27 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests { … … 112 110 BinaryVector actual; 113 111 actual = target.Cross(random, parents); 114 } catch (System.ArgumentException) { 112 } 113 catch (System.ArgumentException) { 115 114 exceptionFired = true; 116 115 } … … 136 135 actual = NPointCrossover.Apply(random, parent1, parent2, n); 137 136 Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected)); 138 137 139 138 // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 48 140 139 random.Reset(); … … 165 164 try { 166 165 actual = NPointCrossover.Apply(random, parent1, parent2, n); 167 } catch (System.ArgumentException) { 166 } 167 catch (System.ArgumentException) { 168 168 exceptionFired = true; 169 169 } -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs
r3742 r4068 21 21 22 22 using System.Reflection; 23 using System.Runtime.CompilerServices;24 23 using System.Runtime.InteropServices; 25 24 -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
r3742 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Core; 22 23 using HeuristicLab.Encodings.BinaryVectorEncoding; 23 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 using HeuristicLab.Common;25 using HeuristicLab.Core;26 using HeuristicLab.Data;27 using HeuristicLab.Parameters;28 25 29 26 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests { … … 112 109 BinaryVector actual; 113 110 actual = target.Cross(random, parents); 114 } catch (System.ArgumentException) { 111 } 112 catch (System.ArgumentException) { 115 113 exceptionFired = true; 116 114 } -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePositionBitflipManipulatorTest.cs
r3062 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.BinaryVectorEncoding; 22 23 using Microsoft.VisualStudio.TestTools.UnitTesting; 23 using HeuristicLab.Encodings.BinaryVectorEncoding;24 using HeuristicLab.Data;25 24 26 25 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests { -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SomePositionsBitflipManipulatorTest.cs
r3062 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Data; 23 using HeuristicLab.Encodings.BinaryVectorEncoding; 22 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 23 using HeuristicLab.Encodings.BinaryVectorEncoding;24 using HeuristicLab.Data;25 25 26 26 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests { -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/UniformCrossoverTest.cs
r3742 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Core; 22 23 using HeuristicLab.Encodings.BinaryVectorEncoding; 23 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 using HeuristicLab.Common;25 using HeuristicLab.Core;26 using HeuristicLab.Data;27 using HeuristicLab.Parameters;28 25 29 26 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests { … … 112 109 BinaryVector actual; 113 110 actual = target.Cross(random, parents); 114 } catch (System.ArgumentException) { 111 } 112 catch (System.ArgumentException) { 115 113 exceptionFired = true; 116 114 } … … 131 129 parent1 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false }); 132 130 parent2 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true }); 133 expected = new BinaryVector(new bool[] { false, true, false, false, false, false, false, false, false });131 expected = new BinaryVector(new bool[] { false, true, false, false, false, false, false, false, false }); 134 132 actual = UniformCrossover.Apply(random, parent1, parent2); 135 133 Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected)); … … 143 141 actual = UniformCrossover.Apply(random, parent1, parent2); 144 142 Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected)); 145 143 146 144 // The following test is not based on any published examples 147 145 random.Reset(); … … 152 150 try { 153 151 actual = UniformCrossover.Apply(random, parent1, parent2); 154 } catch (System.ArgumentException) { 152 } 153 catch (System.ArgumentException) { 155 154 exceptionFired = true; 156 155 }
Note: See TracChangeset
for help on using the changeset viewer.