本文整理汇总了C#中SpreadsheetUtilities.Formula.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Formula.GetHashCode方法的具体用法?C# Formula.GetHashCode怎么用?C# Formula.GetHashCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpreadsheetUtilities.Formula
的用法示例。
在下文中一共展示了Formula.GetHashCode方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestHashCodeTrue
public void TestHashCodeTrue()
{
Formula a = new Formula("2 + X3");
int hashCodeA = a.GetHashCode();
Formula b = new Formula("2+X3");
int hashCodeB = b.GetHashCode();
Assert.AreEqual(hashCodeA, hashCodeB);
}
示例2: TestGetHashCode
public void TestGetHashCode()
{
Formula f1 = new Formula("x1+y2", Normalize, Validate);
Formula f2 = new Formula("X1+Y2");
Assert.IsTrue(f1.GetHashCode() == f2.GetHashCode());
}
示例3: Test45
public void Test45()
{
Formula f1 = new Formula("2*5");
Formula f2 = new Formula("3/8*2+(7)");
Assert.IsTrue(f1.GetHashCode() != f2.GetHashCode());
}
示例4: Test44
public void Test44()
{
Formula f1 = new Formula("2*5");
Formula f2 = new Formula("2*5");
Assert.IsTrue(f1.GetHashCode() == f2.GetHashCode());
}
示例5: TestGetHashCode2
public void TestGetHashCode2()
{
Formula testFormula1 = new Formula("a/b");
Formula testFormula2 = new Formula("b/a");
Assert.IsFalse(testFormula1.GetHashCode() == testFormula2.GetHashCode());
}
示例6: TestGetHashCode1
public void TestGetHashCode1()
{
Formula testFormula1 = new Formula("a/b");
Formula testFormula2 = new Formula("a/b");
Assert.IsTrue(testFormula1.GetHashCode() == testFormula2.GetHashCode());
}
示例7: GetHashcodeTest
public void GetHashcodeTest()
{
Formula f1 = new Formula("x+2");
Formula f2 = new Formula("x+2");
Assert.IsTrue(f1.GetHashCode() == f2.GetHashCode());
}
示例8: PublicTestGetHashCode4WithNormalizer
public void PublicTestGetHashCode4WithNormalizer()
{
Formula f1 = new Formula("5+A1");
Formula f2 = new Formula("5+a1", s =>s.ToUpper(), s => true);
Assert.AreEqual(f1.GetHashCode(), f2.GetHashCode());
}
示例9: PublicTestGetHashCode4
public void PublicTestGetHashCode4()
{
Formula f1 = new Formula("5+A1");
Formula f2 = new Formula("5+a1");
Assert.AreNotEqual(f1.GetHashCode(), f2.GetHashCode());
}
示例10: PublicTestGetHashCode3
public void PublicTestGetHashCode3()
{
Formula f1 = new Formula("5+6e+3");
Formula f2 = new Formula("5+6000");
Assert.AreNotEqual(f1.GetHashCode(), f2.GetHashCode());
}
示例11: PublicTestGetHashCode1
public void PublicTestGetHashCode1()
{
Formula f1 = new Formula("5+A1-72/8+1/2");
Formula f2 = new Formula("5 +A1 - 72 / 8 + 1 / 2");
Assert.AreEqual(f1.GetHashCode(), f2.GetHashCode());
}
示例12: TestHashCodeFalse
public void TestHashCodeFalse()
{
Formula a = new Formula("2 + 3");
int hashCodeA = a.GetHashCode();
Formula b = new Formula("3 + 2");
int hashCodeB = b.GetHashCode();
Assert.AreNotEqual(hashCodeA, hashCodeB);
}
示例13: HashCodeNotEqual
public void HashCodeNotEqual()
{
Formula f = new Formula("x1 + y2 + z3");
int fHash = f.GetHashCode();
Formula g = new Formula("X1 + Y2 + Z3");
int gHash = g.GetHashCode();
Assert.AreNotEqual(gHash, fHash);
}
示例14: HashCodeEqualWithUpper
public void HashCodeEqualWithUpper()
{
Formula f = new Formula("x1 + y2 + z3", s => s.ToUpper(), s => true);
int fHash = f.GetHashCode();
Formula g = new Formula("X1 + Y2 + Z3");
int gHash = g.GetHashCode();
Assert.AreEqual(gHash, fHash);
}