예제 #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());
        }
예제 #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());
        }
예제 #3
0
        public override TreeFilter Clone()
        {
            TreeFilter n = a.Clone();

            return(n == a ? this : new NGit.Treewalk.Filter.NotTreeFilter(n));
        }
예제 #4
0
파일: OrTreeFilter.cs 프로젝트: shoff/ngit
 public override TreeFilter Clone()
 {
     return(new OrTreeFilter.Binary(a.Clone(), b.Clone()));
 }