Ejemplo n.º 1
0
        public virtual void TestCloneIsSparseWhenPossible()
        {
            TreeFilter a = TreeFilter.ALL;

            NUnit.Framework.Assert.AreSame(a, a.Clone());
            TreeFilter n = NotTreeFilter.Create(a);

            NUnit.Framework.Assert.AreSame(n, n.Clone());
        }
Ejemplo n.º 2
0
        public virtual void TestCloneIsDeepClone()
        {
            TreeFilter a = new AlwaysCloneTreeFilter();

            NUnit.Framework.Assert.AreNotSame(a, a.Clone());
            TreeFilter n = NotTreeFilter.Create(a);

            NUnit.Framework.Assert.AreNotSame(n, n.Clone());
        }
Ejemplo n.º 3
0
        public override TreeFilter Clone()
        {
            TreeFilter n = a.Clone();

            return(n == a ? this : new NGit.Treewalk.Filter.NotTreeFilter(n));
        }
Ejemplo n.º 4
0
 public override TreeFilter Clone()
 {
     return(new OrTreeFilter.Binary(a.Clone(), b.Clone()));
 }