- Timestamp:
- 02/03/15 13:50:25 (10 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 11782,11784
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Tests merged: 11782,11784
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r11170 r11867 126 126 private bool ProcessEqualObjects(IDeepCloneable item, IEnumerable<object> intersections) { 127 127 bool success = true; 128 TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":"); 128 bool headerWritten = false; 129 129 130 foreach (object o in intersections) { 130 131 string typeName = o.GetType().FullName; … … 133 134 } else if (o is IDeepCloneable) { 134 135 string info = (o is IItem) ? ((IItem)o).ItemName + ((o is INamedItem) ? ", " + ((INamedItem)o).Name : String.Empty) : String.Empty; 136 if (!headerWritten) { 137 TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":"); 138 headerWritten = true; 139 } 135 140 TestContext.WriteLine("POTENTIAL ERROR! A DEEPCLONEABLE WAS NOT DEEP CLONED (" + info + "): " + typeName); 136 141 success = false; 137 } else 142 } else { 143 Array array = o as Array; 144 if (array != null && array.Length == 0) continue; //arrays of length 0 are used inside empty collections 145 if (!headerWritten) { 146 TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":"); 147 headerWritten = true; 148 } 138 149 TestContext.WriteLine("WARNING: An object of type " + typeName + " is referenced in the original and in the clone."); 150 } 139 151 } 140 152 return success;
Note: See TracChangeset
for help on using the changeset viewer.