Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/01/14 13:10:54 (10 years ago)
Author:
pfleck
Message:

#2208 Added DistanceMatrix to excluded types in DeepCloneableCloningTest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs

    r11185 r11322  
    4949
    5050    public DeepCloneableCloningTest() {
    51       excludedTypes = new HashSet<Type>();
    52       excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.Dataset));
    53       excludedTypes.Add(typeof(HeuristicLab.Problems.TravelingSalesman.DistanceMatrix));
    54       excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution));
    55       excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution));
     51      excludedTypes = new HashSet<Type> {
     52        typeof (HeuristicLab.Problems.DataAnalysis.Dataset),
     53        typeof (HeuristicLab.Problems.TravelingSalesman.DistanceMatrix),
     54        typeof (HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution),
     55        typeof (HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution),
     56        typeof (HeuristicLab.Problems.Orienteering.DistanceMatrix)
     57      };
    5658
    5759      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol)))
     
    9496        try {
    9597          item = (IDeepCloneable)Activator.CreateInstance(deepCloneableType, nonPublic: false);
    96         }
    97         catch { continue; } // no default constructor
     98        } catch { continue; } // no default constructor
    9899
    99100        IDeepCloneable clone = null;
    100101        try {
    101102          clone = (IDeepCloneable)item.Clone(new Cloner());
    102         }
    103         catch (Exception e) {
     103        } catch (Exception e) {
    104104          TestContext.WriteLine(Environment.NewLine + deepCloneableType.FullName + ":");
    105105          TestContext.WriteLine("ERROR! " + e.GetType().Name + @" was thrown during cloning.
Note: See TracChangeset for help on using the changeset viewer.