Skip to content

Commit

Permalink
Delete !CODEGEN_CPP ifdefs from NAOT smoke tests (dotnet#81474)
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion authored Feb 2, 2023
1 parent 2ba2396 commit bab1596
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
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

0 comments on commit bab1596

Please sign in to comment.