Skip to content

Commit 228272e

Browse files
committed
Ensure we test for the side effect
1 parent 11a282b commit 228272e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/tests/JIT/Regression/JitBlue/Runtime_103600/Runtime_103600.cs

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
45
using System.Runtime.CompilerServices;
56
using Xunit;
67

@@ -16,9 +17,27 @@
1617
public class Runtime_103600
1718
{
1819
[Fact]
19-
public static void TestEntryPoint()
20+
public static int TestEntryPoint()
21+
{
22+
int result = 0;
23+
24+
try
25+
{
26+
Test();
27+
}
28+
catch (NullReferenceException)
29+
{
30+
result = 100;
31+
}
32+
33+
return result;
34+
}
35+
36+
[MethodImpl(MethodImplOptions.NoInlining)]
37+
private static void Test()
2038
{
2139
ulong[] vr0 = default(ulong[]);
40+
2241
if (0 > vr0[0])
2342
{
2443
vr0 = vr0;

0 commit comments

Comments
 (0)