summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/int64/misc/box.cs
blob: e42728affa37f77d962b7faad6a01928a8108ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace JitTest
{
    internal class Test
    {
        private static int Main()
        {
            try
            {
                ulong L1 = 0x8000123480001234;
                if (L1 != (ulong)(object)(ulong)(object)(ulong)(object)L1)
                    goto fail;
                long L2 = unchecked((long)0x8000123480001234);
                if (L2 != (long)(object)(long)(object)(long)(object)L2)
                    goto fail;
            }
            catch (Exception)
            {
                Console.WriteLine("Exception handled!");
                goto fail;
            }
            Console.WriteLine("Passed");
            return 100;
        fail:
            Console.WriteLine("Failed");
            return 1;
        }
    }
}