Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11322


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

#2208 Added DistanceMatrix to excluded types in DeepCloneableCloningTest.

Location:
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests
Files:
2 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.
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r11289 r11322  
    296296    <Reference Include="HeuristicLab.Problems.LinearAssignment-3.3">
    297297      <HintPath>..\bin\HeuristicLab.Problems.LinearAssignment-3.3.dll</HintPath>
     298      <Private>False</Private>
     299    </Reference>
     300    <Reference Include="HeuristicLab.Problems.Orienteering-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     301      <HintPath>..\bin\HeuristicLab.Problems.Orienteering-3.3.dll</HintPath>
    298302      <Private>False</Private>
    299303    </Reference>
Note: See TracChangeset for help on using the changeset viewer.