- Timestamp:
- 01/16/15 10:00:25 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r11514 r11782 119 119 private bool ProcessEqualObjects(IDeepCloneable item, IEnumerable<object> intersections) { 120 120 bool success = true; 121 TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":"); 121 bool headerWritten = false; 122 122 123 foreach (object o in intersections) { 123 124 string typeName = o.GetType().FullName; … … 126 127 } else if (o is IDeepCloneable) { 127 128 string info = (o is IItem) ? ((IItem)o).ItemName + ((o is INamedItem) ? ", " + ((INamedItem)o).Name : String.Empty) : String.Empty; 129 if (!headerWritten) { 130 TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":"); 131 headerWritten = true; 132 } 128 133 TestContext.WriteLine("POTENTIAL ERROR! A DEEPCLONEABLE WAS NOT DEEP CLONED (" + info + "): " + typeName); 129 134 success = false; 130 } else 135 } else { 136 Array array = o as Array; 137 if (array != null && array.Length == 0) continue; //arrays of length 0 are used inside empty collectionss 138 if (!headerWritten) { 139 TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":"); 140 headerWritten = true; 141 } 131 142 TestContext.WriteLine("WARNING: An object of type " + typeName + " is referenced in the original and in the clone."); 143 } 132 144 } 133 145 return success;
Note: See TracChangeset
for help on using the changeset viewer.