Delete !CODEGEN_CPP ifdefs from NAOT smoke tests (#81474)
authorSingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Thu, 2 Feb 2023 03:41:15 +0000 (06:41 +0300)
committerGitHub <noreply@github.com>
Thu, 2 Feb 2023 03:41:15 +0000 (12:41 +0900)
src/tests/nativeaot/SmokeTests/Reflection/Reflection.cs
src/tests/nativeaot/SmokeTests/UnitTests/Delegates.cs
src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs

index 697b449..6717aca 100644 (file)
@@ -37,11 +37,8 @@ internal static class ReflectionTest
 #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();
 
@@ -76,14 +73,13 @@ internal static class ReflectionTest
         TestInvokeMemberParamsCornerCase.Run();
         TestDefaultInterfaceInvoke.Run();
         TestCovariantReturnInvoke.Run();
-#if !CODEGEN_CPP
         TypeConstructionTest.Run();
         TestThreadStaticFields.Run();
         TestByRefReturnInvoke.Run();
         TestAssemblyLoad.Run();
-#endif
         TestBaseOnlyUsedFromCode.Run();
         TestEntryPoint.Run();
+
         return 100;
     }
 
@@ -249,7 +245,6 @@ internal static class ReflectionTest
                     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" });
@@ -277,7 +272,6 @@ internal static class ReflectionTest
                 if (result != "Hello 1 System.Double")
                     throw new Exception();
             }
-#endif
         }
     }
 
@@ -1106,12 +1100,9 @@ internal static class ReflectionTest
             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
         }
     }
 
@@ -1408,7 +1399,6 @@ internal static class ReflectionTest
                     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);
@@ -1431,7 +1421,6 @@ internal static class ReflectionTest
                     throw new Exception("CompilerGlobalScopeAttribute");
             }
 #endif
-#endif
 
             Console.WriteLine("Enum.GetValues");
             {
index 4280753..2617cb5 100644 (file)
@@ -51,10 +51,7 @@ public class Delegates
             result = Fail;
         }
 
-#if !CODEGEN_CPP
         TestLinqExpressions.Run();
-#endif
-
         TestDefaultInterfaceMethods.Run();
 
         return result;
index dffc859..2aa1bd0 100644 (file)
@@ -50,13 +50,12 @@ class Generics
         TestGvmLookupDependency.Run();
         TestInvokeMemberCornerCaseInGenerics.Run();
         TestRefAny.Run();
-#if !CODEGEN_CPP
         TestNullableCasting.Run();
         TestVariantCasting.Run();
         TestMDArrayAddressMethod.Run();
         TestNativeLayoutGeneration.Run();
         TestByRefLikeVTables.Run();
-#endif
+
         return 100;
     }