summaryrefslogtreecommitdiff
path: root/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/value/box-unbox-value027.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/JIT/jit64/valuetypes/nullable/box-unbox/value/box-unbox-value027.cs')
-rw-r--r--tests/src/JIT/jit64/valuetypes/nullable/box-unbox/value/box-unbox-value027.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/value/box-unbox-value027.cs b/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/value/box-unbox-value027.cs
new file mode 100644
index 0000000000..7536471987
--- /dev/null
+++ b/tests/src/JIT/jit64/valuetypes/nullable/box-unbox/value/box-unbox-value027.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+// <Area> Nullable - Box-Unbox </Area>
+// <Title> Nullable type with unbox box expr </Title>
+// <Description>
+// checking type of NotEmptyStructGen<int> using is operator
+// </Description>
+// <RelatedBugs> </RelatedBugs>
+//<Expects Status=success></Expects>
+// <Code>
+
+
+using System.Runtime.InteropServices;
+using System;
+
+internal class NullableTest
+{
+ private static bool BoxUnboxToNQ(ValueType o)
+ {
+ return Helper.Compare((NotEmptyStructGen<int>)o, Helper.Create(default(NotEmptyStructGen<int>)));
+ }
+
+ private static bool BoxUnboxToQ(ValueType o)
+ {
+ return Helper.Compare((NotEmptyStructGen<int>?)o, Helper.Create(default(NotEmptyStructGen<int>)));
+ }
+
+ private static int Main()
+ {
+ NotEmptyStructGen<int>? s = Helper.Create(default(NotEmptyStructGen<int>));
+
+ if (BoxUnboxToNQ(s) && BoxUnboxToQ(s))
+ return ExitCode.Passed;
+ else
+ return ExitCode.Failed;
+ }
+}
+
+