Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete !CODEGEN_CPP ifdefs from NAOT smoke tests #81474

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/tests/nativeaot/SmokeTests/Reflection/Reflection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ private static int Main()
#if !OPTIMIZED_MODE_WITHOUT_SCANNER
TestContainment.Run();
TestInterfaceMethod.Run();
// Need to implement RhGetCodeTarget for CppCodeGen
#if !CODEGEN_CPP
TestByRefLikeTypeMethod.Run();
#endif
#endif
TestILScanner.Run();
TestUnreferencedEnum.Run();
Expand Down Expand Up @@ -76,14 +73,13 @@ private static int Main()
TestInvokeMemberParamsCornerCase.Run();
TestDefaultInterfaceInvoke.Run();
TestCovariantReturnInvoke.Run();
#if !CODEGEN_CPP
TypeConstructionTest.Run();
TestThreadStaticFields.Run();
TestByRefReturnInvoke.Run();
TestAssemblyLoad.Run();
#endif
TestBaseOnlyUsedFromCode.Run();
TestEntryPoint.Run();

return 100;
}

Expand Down Expand Up @@ -249,7 +245,6 @@ public static unsafe void Run()
throw new Exception();
}

#if !CODEGEN_CPP
{
MethodInfo helloMethod = typeof(InvokeTestsGeneric<string>).GetTypeInfo().GetDeclaredMethod("GetHello");
string result = (string)helloMethod.Invoke(new InvokeTestsGeneric<string>(), new object[] { "world" });
Expand Down Expand Up @@ -277,7 +272,6 @@ public static unsafe void Run()
if (result != "Hello 1 System.Double")
throw new Exception();
}
#endif
}
}

Expand Down Expand Up @@ -1106,12 +1100,9 @@ public static void Run()
if (!HasTypeHandle(usedNestedType))
throw new Exception($"{nameof(NeverUsedContainerType.UsedNestedType)} should have an EEType");

// Need to implement exceptions for CppCodeGen
#if !CODEGEN_CPP
// But the containing type doesn't need an EEType
if (HasTypeHandle(neverUsedContainerType))
throw new Exception($"{nameof(NeverUsedContainerType)} should not have an EEType");
#endif
}
}

Expand Down Expand Up @@ -1408,7 +1399,6 @@ public static void Run()
throw new Exception("PartialCanon");
}

#if !CODEGEN_CPP // https://github.com/dotnet/corert/issues/7799
Console.WriteLine("Search in system assembly");
{
Type t = Type.GetType("System.Runtime.CompilerServices.SuppressIldasmAttribute", throwOnError: false);
Expand All @@ -1430,7 +1420,6 @@ public static void Run()
if (t == null)
throw new Exception("CompilerGlobalScopeAttribute");
}
#endif
#endif

Console.WriteLine("Enum.GetValues");
Expand Down
3 changes: 0 additions & 3 deletions src/tests/nativeaot/SmokeTests/UnitTests/Delegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ public static int Run()
result = Fail;
}

#if !CODEGEN_CPP
TestLinqExpressions.Run();
#endif

TestDefaultInterfaceMethods.Run();

return result;
Expand Down
3 changes: 1 addition & 2 deletions src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ internal static int Run()
TestGvmLookupDependency.Run();
TestInvokeMemberCornerCaseInGenerics.Run();
TestRefAny.Run();
#if !CODEGEN_CPP
TestNullableCasting.Run();
TestVariantCasting.Run();
TestMDArrayAddressMethod.Run();
TestNativeLayoutGeneration.Run();
TestByRefLikeVTables.Run();
#endif

return 100;
}

Expand Down