diff --git a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/CSharpAnalyzerVerifier`1+Test.cs b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/CSharpAnalyzerVerifier`1+Test.cs index 1372bc02caacde..fb8a08a8c49054 100644 --- a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/CSharpAnalyzerVerifier`1+Test.cs +++ b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/CSharpAnalyzerVerifier`1+Test.cs @@ -1,5 +1,6 @@ using Microsoft.CodeAnalysis.CSharp.Testing; using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; using Microsoft.CodeAnalysis.Testing.Verifiers; namespace IntrinsicsInSystemPrivateCoreLib.Test @@ -11,6 +12,11 @@ public class Test : CSharpAnalyzerTest { public Test() { + // Clear out the default reference assemblies. We explicitly add references from the live ref pack, + // so we don't want the Roslyn test infrastructure to resolve/add any default reference assemblies + ReferenceAssemblies = new ReferenceAssemblies(string.Empty); + TestState.AdditionalReferences.AddRange(SourceGenerators.Tests.LiveReferencePack.GetMetadataReferences()); + SolutionTransforms.Add((solution, projectId) => { var compilationOptions = solution.GetProject(projectId).CompilationOptions; diff --git a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj index 790a0c81a36356..62859b1fbbad02 100644 --- a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj +++ b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj @@ -2,6 +2,7 @@ $(NetCoreAppCurrent) + true @@ -13,6 +14,7 @@ + diff --git a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs index 10c304ac76a04b..2efb366d161c89 100644 --- a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs +++ b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs @@ -90,7 +90,6 @@ class PackedSimd "; [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUse() { var test = BoilerPlate + @" @@ -110,7 +109,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseWithIntrinsicsHelperAttribute() { var test = BoilerPlate + @" @@ -131,7 +129,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseWithIntrinsicsHelperAttributeComplex() { var test = BoilerPlate + @" @@ -157,7 +154,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseInLocalFunctionWithIntrinsicsHelperAttributeNotOnLocalFunction() { var test = BoilerPlate + @" @@ -183,7 +179,6 @@ static void LocalFunc() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseInLambdaWithIntrinsicsHelperAttributeOnOuterFunction() { var test = BoilerPlate + @" @@ -209,7 +204,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseInLocalFunctionWithIntrinsicsHelperAttributeOnLocalFunction() { var test = BoilerPlate + @" @@ -235,7 +229,6 @@ static void LocalFunc() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedNestedTypeUse() { var test = BoilerPlate + @" @@ -275,7 +268,6 @@ static void FuncGood() [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementButWithInadequateHelperMethodAttribute() { var test = BoilerPlate + @" @@ -317,7 +309,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementWithNestedAndBaseTypeLookupRequired() { var test = BoilerPlate + @" @@ -337,7 +328,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithTernaryOperator() { var test = BoilerPlate + @" @@ -356,7 +346,6 @@ static bool FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementWithOrOperationCase() { var test = BoilerPlate + @" @@ -386,7 +375,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementWithOrOperationCaseWithImplicationProcessingRequired() { var test = BoilerPlate + @" @@ -416,7 +404,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementAroundLocalFunctionDefinition() { var test = BoilerPlate + @" @@ -446,7 +433,6 @@ void LocalFunction() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementAroundLambdaFunctionDefinition() { var test = BoilerPlate + @" @@ -473,7 +459,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsCanOnlyBeCalledWithAppropriateIsSupportedChecksError() { var test = BoilerPlate + @" @@ -524,7 +509,6 @@ static void FuncBad() await VerifyCS.VerifyAnalyzerAsync(test, expected, expected2, expected3, expected4, expected5); } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsCanOnlyBeCalledWithAppropriateIsSupportedChecksSuccess() { var test = BoilerPlate + @" @@ -565,7 +549,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsUnrelatedPropertyDoesntHelp() { var test = BoilerPlate + @" @@ -596,7 +579,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsWithHelperProperty() { var test = BoilerPlate + @" @@ -627,7 +609,6 @@ static void FuncGood() [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUseOfIntrinsicsFromWithinOtherMethodOnIntrinsicType() { var test = @"