Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/23/16 19:31:18 (8 years ago)
Author:
bburlacu
Message:

#2685: Add correction step for values miscalculated due to cyclical symbol dependencies in the grammar. Updated unit test.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SinglePointCrossoverTest.cs

    r13129 r14353  
    3939    [TestProperty("Time", "short")]
    4040    public void SinglePointCrossoverCrossTest() {
    41       SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover)));
     41      var privateObject = new PrivateObject(typeof(SinglePointCrossover));
    4242      ItemArray<BinaryVector> parents;
    4343      TestRandom random = new TestRandom();
     
    4848      exceptionFired = false;
    4949      try {
    50         BinaryVector actual;
    51         actual = target.Cross(random, parents);
    52       } catch (ArgumentException) {
     50        var actual = (BinaryVector)privateObject.Invoke("Cross", random, parents);
     51      }
     52      catch (ArgumentException) {
    5353        exceptionFired = true;
    5454      }
     
    5959      exceptionFired = false;
    6060      try {
    61         BinaryVector actual;
    62         actual = target.Cross(random, parents);
    63       } catch (ArgumentException) {
     61        var actual = (BinaryVector)privateObject.Invoke("Cross", random, parents);
     62      }
     63      catch (ArgumentException) {
    6464        exceptionFired = true;
    6565      }
Note: See TracChangeset for help on using the changeset viewer.