Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/20/19 15:01:31 (4 years ago)
Author:
abeham
Message:

#2521: fix bugs in unit tests, add vns_tsp sample

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs

    r17254 r17359  
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Core;
     28using HeuristicLab.Data;
    2829using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2930using HeuristicLab.Optimization;
    3031using HeuristicLab.PluginInfrastructure;
    31 using HeuristicLab.Problems.TravelingSalesman;
    3232using Microsoft.VisualStudio.TestTools.UnitTesting;
    3333
     
    4848        typeof (HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution),
    4949        typeof (HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution),
    50         typeof (HeuristicLab.Problems.Orienteering.DistanceMatrix)
     50        typeof (HeuristicLab.Problems.Orienteering.DistanceMatrix),
     51        typeof (HeuristicLab.Problems.TravelingSalesman.EuclideanTSPData),
    5152      };
    5253      excludedTypes.Add(typeof(SymbolicExpressionGrammar).Assembly.GetType("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.EmptySymbolicExpressionTreeGrammar"));
    53 
    54       foreach (var tspData in ApplicationManager.Manager.GetTypes(typeof(ITSPData)))
    55         excludedTypes.Add(tspData);
    5654
    5755      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(Symbol)))
     
    129127
    130128      foreach (object o in intersections) {
     129        // check if the object is an immutable value, array, or matrix
     130        if (o is IStringConvertibleMatrix m && m.ReadOnly
     131          || o is IStringConvertibleValue v && v.ReadOnly
     132          || o is IStringConvertibleArray a && a.ReadOnly) {
     133          continue;
     134        }
    131135        string typeName = o.GetType().FullName;
    132136        if (excludedTypes.Contains(o.GetType())) {
Note: See TracChangeset for help on using the changeset viewer.