Skip to content

Commit

Permalink
Update tests, make them no inline
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Mar 13, 2024
1 parent 95f3329 commit f2381ee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/tests/JIT/Intrinsics/TypeIntrinsics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ private static void IsGenericTypeTests()
IsFalse(new ClassUsingIsGenericTypeOnT<string>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<object>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<int[]>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<GenericSimpleClass<int>>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<IGenericInterface<string>>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<List<object>>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<Action<string>>().IsGenericTypeFromArray());

IsTrue(typeof(GenericSimpleClass<int>).IsGenericType);
IsTrue(typeof(GenericSimpleClass<>).IsGenericType);
Expand Down Expand Up @@ -266,10 +270,6 @@ private static void IsGenericTypeTests()
IsTrue(new ClassUsingIsGenericTypeOnT<GenericSimpleClass<int>>().IsGenericType());
IsTrue(new ClassUsingIsGenericTypeOnT<int?>().IsGenericType());
IsTrue(new ClassUsingIsGenericTypeOnT<Action<string>>().IsGenericType());
IsFalse(new ClassUsingIsGenericTypeOnT<GenericSimpleClass<int>>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<IGenericInterface<string>>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<List<object>>().IsGenericTypeFromArray());
IsFalse(new ClassUsingIsGenericTypeOnT<Action<string>>().IsGenericTypeFromArray());
IsTrue(new ClassUsingIsGenericTypeOnT<char>().IsGenericTypeFromOtherGenericType());
IsTrue(new ClassUsingIsGenericTypeOnT<string>().IsGenericTypeFromOtherGenericType());
IsTrue(new ClassUsingIsGenericTypeOnT<object>().IsGenericTypeFromOtherGenericType());
Expand Down Expand Up @@ -350,10 +350,13 @@ static void ThrowsNRE(Action action, [CallerLineNumber] int line = 0, [CallerFil

public class ClassUsingIsGenericTypeOnT<T>
{
[MethodImpl(MethodImplOptions.NoInlining)]
public bool IsGenericType() => typeof(T).IsGenericType;

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

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

Expand Down

0 comments on commit f2381ee

Please sign in to comment.