Changeset 11322 for branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
- Timestamp:
- 09/01/14 13:10:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r11185 r11322 49 49 50 50 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 }; 56 58 57 59 foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol))) … … 94 96 try { 95 97 item = (IDeepCloneable)Activator.CreateInstance(deepCloneableType, nonPublic: false); 96 } 97 catch { continue; } // no default constructor 98 } catch { continue; } // no default constructor 98 99 99 100 IDeepCloneable clone = null; 100 101 try { 101 102 clone = (IDeepCloneable)item.Clone(new Cloner()); 102 } 103 catch (Exception e) { 103 } catch (Exception e) { 104 104 TestContext.WriteLine(Environment.NewLine + deepCloneableType.FullName + ":"); 105 105 TestContext.WriteLine("ERROR! " + e.GetType().Name + @" was thrown during cloning.
Note: See TracChangeset
for help on using the changeset viewer.