using System;
using System.Runtime.InteropServices;
/// <summary>
/// LayoutKind.Sequential [v-minch]
/// </summary>
public class LayoutKindSequential
{
    public static int Main()
    {
        LayoutKindSequential test = new LayoutKindSequential();
        TestLibrary.TestFramework.BeginTestCase("LayoutKind.Sequential");
        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
    public bool RunTests()
    {
        bool retVal = true;
        TestLibrary.TestFramework.LogInformation("[Positive]");
        retVal = PosTest1() && retVal;
        return retVal;
    }
    #region PositiveTest
    public bool PosTest1()
    {
        bool retVal = true;
        TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the Sequential in the LayoutKind Enumerator");
        try
        {
            int myVal = (int)LayoutKind.Sequential;
            if (myVal != 0)
            {
                TestLibrary.TestFramework.LogError("001", "the Sequential in the LayoutKind ExpectResult is 0 but the ActualResult is  " + myVal);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
            retVal = false;
        }
        return retVal;
    }
    #endregion
}