public void testCloneIsDeepClone() { TreeFilter a = new AlwaysCloneTreeFilter(); Assert.AreNotSame(a, a.Clone()); TreeFilter n = NotTreeFilter.create(a); Assert.AreNotSame(n, n.Clone()); }
public void testCloneIsSparseWhenPossible() { TreeFilter a = TreeFilter.ALL; Assert.AreSame(a, a.Clone()); TreeFilter n = NotTreeFilter.create(a); Assert.AreSame(n, n.Clone()); }
public override TreeFilter Clone() { TreeFilter n = a.Clone(); return(n == a ? this : new NotTreeFilter(n)); }