Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/18/15 13:01:38 (8 years ago)
Author:
ascheibe
Message:

#2510 merged r13227, r13235, r13236 into stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs

    r12009 r13246  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    2322using HeuristicLab.Tests;
    2423using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    3130  [TestClass()]
    3231  public class OrderCrossover2Test {
    33     /// <summary>
    34     ///A test for Cross
    35     ///</summary>
    36     [TestMethod]
    37     [TestCategory("Encodings.Permutation")]
    38     [TestProperty("Time", "short")]
    39     public void OrderCrossover2CrossTest() {
    40       TestRandom random = new TestRandom();
    41       OrderCrossover2_Accessor target = new OrderCrossover2_Accessor(new PrivateObject(typeof(OrderCrossover2)));
    42       random.Reset();
    43       bool exceptionFired = false;
    44       try {
    45         target.Cross(random, new ItemArray<Permutation>(new Permutation[] {
    46           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
    47       } catch (System.InvalidOperationException) {
    48         exceptionFired = true;
    49       }
    50       Assert.IsTrue(exceptionFired);
    51     }
    52 
    5332    /// <summary>
    5433    ///A test for Apply
     
    7857      try {
    7958        OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
    80       } catch (System.ArgumentException) {
     59      }
     60      catch (System.ArgumentException) {
    8161        exceptionFired = true;
    8262      }
Note: See TracChangeset for help on using the changeset viewer.