Пример #1
0
    public bool PosTest1()
    {
        bool retVal = true;
        Type tpA;
        int  ActualResult;

        TestLibrary.TestFramework.BeginScenario("PosTest1: normal Type get hash code");
        try
        {
            tpA          = typeof(testClass);
            ActualResult = tpA.GetHashCode();
            testClass tc = new testClass(ActualResult);
            if (ActualResult != tc.GetHashCode())
            {
                TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
            retVal = false;
        }
        return(retVal);
    }
Пример #2
0
    public bool PosTest1()
    {
        bool retVal = true;
        Type tpA;
        int ActualResult;

        TestLibrary.TestFramework.BeginScenario("PosTest1: normal Type get hash code");
        try
        {
            tpA = typeof(testClass);
            ActualResult = tpA.GetHashCode();
            testClass tc = new testClass(ActualResult);
            if (ActualResult != tc.GetHashCode())
            {
                TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
            retVal = false;
        }
        return retVal;

    }
 public void getHashOfDos()
 {
     Debug.LogWarning(dos.GetHashCode());
 }
 public void getHashOfUno()
 {
     Debug.LogWarning(uno.GetHashCode());
 }