Changeset 8086 for branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
- Timestamp:
- 06/22/12 11:11:38 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 20 20 bin 21 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests
- Property svn:ignore
-
old new 3 3 HeuristicLab.Tests.csproj.user 4 4 *.vs10x 5 _ReSharper.HeuristicLab 3.3 Tests
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab-3.3
- Property bugtraq:label deleted
- Property bugtraq:logregex deleted
- Property bugtraq:url deleted
- Property bugtraq:warnifnoissue deleted
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r7467 r8086 122 122 catch { continue; } // no default constructor 123 123 124 var clone = (IDeepCloneable)item.Clone(new Cloner()); 124 IDeepCloneable clone = null; 125 try { 126 clone = (IDeepCloneable)item.Clone(new Cloner()); 127 } 128 catch (Exception e) { 129 TestContext.WriteLine(Environment.NewLine + deepCloneableType.FullName + ":"); 130 TestContext.WriteLine("ERROR! " + e.GetType().Name + @" was thrown during cloning. 131 All IDeepCloneable items with a default constructor should be cloneable when using that constructor!"); 132 success = false; 133 continue; 134 } 125 135 var intersections = CheckTotalInequality(item, clone).Where(x => x.GetType().FullName.StartsWith("HeuristicLab")); 126 136 if (!intersections.Any()) continue; … … 136 146 var clonedObjects = new HashSet<object>(clone.GetObjectGraphObjects(excludeStaticMembers: true).Where(x => !x.GetType().IsValueType), new ReferenceEqualityComparer()); 137 147 138 return originalObjects.Intersect(clonedObjects );148 return originalObjects.Intersect(clonedObjects, new ReferenceEqualityComparer()); 139 149 } 140 150
Note: See TracChangeset
for help on using the changeset viewer.