Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/23/16 19:33:03 (7 years ago)
Author:
bburlacu
Message:

#2685: Revert accidental commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/AckleyEvaluatorTest.cs

    r14353 r14354  
    3737    [TestProperty("Time", "short")]
    3838    public void AckleyEvaluateFunctionTest() {
    39       var privateObject = new PrivateObject(typeof(AckleyEvaluator));
     39      AckleyEvaluator target = new AckleyEvaluator();
    4040      RealVector point = null;
    41       double expected = (double)privateObject.GetProperty("BestKnownQuality");
     41      double expected = target.BestKnownQuality;
    4242      double actual;
    43       int minimumProblemSize = (int)privateObject.GetProperty("MinimumProblemSize");
    44       int maximumProblemSize = (int)privateObject.GetProperty("MaximumProblemSize");
    45       for (int dimension = minimumProblemSize; dimension <= System.Math.Min(10, maximumProblemSize); dimension++) {
    46         point = (RealVector)privateObject.Invoke("GetBestKnownSolution", dimension);
    47         actual = (double)privateObject.Invoke("Evaluate", point);
     43      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
     44        point = target.GetBestKnownSolution(dimension);
     45        actual = target.Evaluate(point);
    4846        Assert.AreEqual(expected, actual);
    4947      }
Note: See TracChangeset for help on using the changeset viewer.