Пример #1
0
        public virtual void TestEmpty()
        {
            EditList l = new EditList();

            NUnit.Framework.Assert.AreEqual(0, l.Count);
            NUnit.Framework.Assert.IsTrue(l.IsEmpty());
            NUnit.Framework.Assert.AreEqual("EditList[]", l.ToString());
            NUnit.Framework.Assert.AreEqual(l, l);
            NUnit.Framework.Assert.AreEqual(new EditList(), l);
            NUnit.Framework.Assert.IsFalse(l.Equals(string.Empty));
            NUnit.Framework.Assert.AreEqual(l.GetHashCode(), new EditList().GetHashCode());
        }
Пример #2
0
 /// <param name="args">two filenames specifying the contents to be diffed</param>
 public static void Main(string[] args)
 {
     if (args.Length != 2)
     {
         System.Console.Error.WriteLine(JGitText.Get().need2Arguments);
         System.Environment.Exit(1);
     }
     try
     {
         RawText  a = new RawText(new FilePath(args[0]));
         RawText  b = new RawText(new FilePath(args[1]));
         EditList r = INSTANCE.Diff(RawTextComparator.DEFAULT, a, b);
         System.Console.Out.WriteLine(r.ToString());
     }
     catch (Exception e)
     {
         Sharpen.Runtime.PrintStackTrace(e);
     }
 }