예제 #1
0
            public void TestConstructor()
            {
                VectorFont.KerningPair pair = new VectorFont.KerningPair('A', 'B');

                Assert.AreEqual('A', pair.Left);
                Assert.AreEqual('B', pair.Right);
            }
예제 #2
0
 public void TestEqualityCheck() {
   VectorFont.KerningPair pair1 = new VectorFont.KerningPair('A', 'B');
   VectorFont.KerningPair pair2 = new VectorFont.KerningPair('A', 'B');
   VectorFont.KerningPair pair3 = new VectorFont.KerningPair('B', 'C');
   
   Assert.IsTrue(pair1.Equals(pair2));
   Assert.IsFalse(pair2.Equals(pair3));
 }
예제 #3
0
      public void TestGetHashCode() {
        VectorFont.KerningPair pair1 = new VectorFont.KerningPair('A', 'B');
        VectorFont.KerningPair pair2 = new VectorFont.KerningPair('A', 'B');

        // Can't check for inequality, always returning "123" as hash code would
        // be legal (even if not exactly the crown of efficiency :D)
        Assert.AreEqual(pair1.GetHashCode(), pair2.GetHashCode());
      }
예제 #4
0
            public void TestEqualityCheck()
            {
                VectorFont.KerningPair pair1 = new VectorFont.KerningPair('A', 'B');
                VectorFont.KerningPair pair2 = new VectorFont.KerningPair('A', 'B');
                VectorFont.KerningPair pair3 = new VectorFont.KerningPair('B', 'C');

                Assert.IsTrue(pair1.Equals(pair2));
                Assert.IsFalse(pair2.Equals(pair3));
            }
예제 #5
0
            public void TestGetHashCode()
            {
                VectorFont.KerningPair pair1 = new VectorFont.KerningPair('A', 'B');
                VectorFont.KerningPair pair2 = new VectorFont.KerningPair('A', 'B');

                // Can't check for inequality, always returning "123" as hash code would
                // be legal (even if not exactly the crown of efficiency :D)
                Assert.AreEqual(pair1.GetHashCode(), pair2.GetHashCode());
            }
예제 #6
0
 public void TestEqualityCheckAgainstIncompatibleType()
 {
     VectorFont.KerningPair pair = new VectorFont.KerningPair('A', 'B');
     Assert.IsFalse(pair.Equals(new object()));
 }
예제 #7
0
 public void TestEqualityCheckAgainstIncompatibleType() {
   VectorFont.KerningPair pair = new VectorFont.KerningPair('A', 'B');
   Assert.IsFalse(pair.Equals(new object()));
 }
예제 #8
0
 public void TestConstructor() {
   VectorFont.KerningPair pair = new VectorFont.KerningPair('A' ,'B');
   
   Assert.AreEqual('A', pair.Left);
   Assert.AreEqual('B', pair.Right);
 }