示例#1
0
        public void testCloneIsDeepClone()
        {
            TreeFilter a = new AlwaysCloneTreeFilter();

            Assert.AreNotSame(a, a.Clone());
            TreeFilter n = NotTreeFilter.create(a);

            Assert.AreNotSame(n, n.Clone());
        }
示例#2
0
        public void testCloneIsSparseWhenPossible()
        {
            TreeFilter a = TreeFilter.ALL;

            Assert.AreSame(a, a.Clone());
            TreeFilter n = NotTreeFilter.create(a);

            Assert.AreSame(n, n.Clone());
        }
示例#3
0
        public override TreeFilter Clone()
        {
            TreeFilter n = a.Clone();

            return(n == a ? this : new NotTreeFilter(n));
        }