summaryrefslogtreecommitdiff
path: root/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs')
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs73
1 files changed, 73 insertions, 0 deletions
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs
new file mode 100644
index 0000000000..36b5f4cc8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pushi8 [v-yishi]
+/// </summary>
+public class StackBehaviourPushi8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pushi8 is 22");
+
+ try
+ {
+ int expected = 22;
+ int actual = (int)StackBehaviour.Pushi8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pushi8's value is not 22");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPushi8 test = new StackBehaviourPushi8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPushi8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 22;
+ }
+ }
+}