Skip to content

Commit f2381ee

Browse files
committed
Update tests, make them no inline
1 parent 95f3329 commit f2381ee

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/tests/JIT/Intrinsics/TypeIntrinsics.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ private static void IsGenericTypeTests()
238238
IsFalse(new ClassUsingIsGenericTypeOnT<string>().IsGenericTypeFromArray());
239239
IsFalse(new ClassUsingIsGenericTypeOnT<object>().IsGenericTypeFromArray());
240240
IsFalse(new ClassUsingIsGenericTypeOnT<int[]>().IsGenericTypeFromArray());
241+
IsFalse(new ClassUsingIsGenericTypeOnT<GenericSimpleClass<int>>().IsGenericTypeFromArray());
242+
IsFalse(new ClassUsingIsGenericTypeOnT<IGenericInterface<string>>().IsGenericTypeFromArray());
243+
IsFalse(new ClassUsingIsGenericTypeOnT<List<object>>().IsGenericTypeFromArray());
244+
IsFalse(new ClassUsingIsGenericTypeOnT<Action<string>>().IsGenericTypeFromArray());
241245

242246
IsTrue(typeof(GenericSimpleClass<int>).IsGenericType);
243247
IsTrue(typeof(GenericSimpleClass<>).IsGenericType);
@@ -266,10 +270,6 @@ private static void IsGenericTypeTests()
266270
IsTrue(new ClassUsingIsGenericTypeOnT<GenericSimpleClass<int>>().IsGenericType());
267271
IsTrue(new ClassUsingIsGenericTypeOnT<int?>().IsGenericType());
268272
IsTrue(new ClassUsingIsGenericTypeOnT<Action<string>>().IsGenericType());
269-
IsFalse(new ClassUsingIsGenericTypeOnT<GenericSimpleClass<int>>().IsGenericTypeFromArray());
270-
IsFalse(new ClassUsingIsGenericTypeOnT<IGenericInterface<string>>().IsGenericTypeFromArray());
271-
IsFalse(new ClassUsingIsGenericTypeOnT<List<object>>().IsGenericTypeFromArray());
272-
IsFalse(new ClassUsingIsGenericTypeOnT<Action<string>>().IsGenericTypeFromArray());
273273
IsTrue(new ClassUsingIsGenericTypeOnT<char>().IsGenericTypeFromOtherGenericType());
274274
IsTrue(new ClassUsingIsGenericTypeOnT<string>().IsGenericTypeFromOtherGenericType());
275275
IsTrue(new ClassUsingIsGenericTypeOnT<object>().IsGenericTypeFromOtherGenericType());
@@ -350,10 +350,13 @@ static void ThrowsNRE(Action action, [CallerLineNumber] int line = 0, [CallerFil
350350

351351
public class ClassUsingIsGenericTypeOnT<T>
352352
{
353+
[MethodImpl(MethodImplOptions.NoInlining)]
353354
public bool IsGenericType() => typeof(T).IsGenericType;
354355

356+
[MethodImpl(MethodImplOptions.NoInlining)]
355357
public bool IsGenericTypeFromArray() => typeof(T[]).IsGenericType;
356358

359+
[MethodImpl(MethodImplOptions.NoInlining)]
357360
public bool IsGenericTypeFromOtherGenericType() => typeof(GenericSimpleClass<T>).IsGenericType;
358361
}
359362

0 commit comments

Comments
 (0)