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 1372bc02caacd..fb8a08a8c4905 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 790a0c81a3635..62859b1fbbad0 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 10c304ac76a04..f83ecfd3621ed 100644 --- a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs +++ b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs @@ -5,7 +5,6 @@ namespace IntrinsicsInSystemPrivateCoreLib.Test { - [SkipOnPlatform(TestPlatforms.Browser, "Do not try to run analyzer tests in the browser")] public class IntrinsicsInSystemPrivateCoreLibUnitTest { string BoilerPlate = @" @@ -90,7 +89,6 @@ class PackedSimd "; [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUse() { var test = BoilerPlate + @" @@ -110,7 +108,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseWithIntrinsicsHelperAttribute() { var test = BoilerPlate + @" @@ -131,7 +128,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseWithIntrinsicsHelperAttributeComplex() { var test = BoilerPlate + @" @@ -157,7 +153,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseInLocalFunctionWithIntrinsicsHelperAttributeNotOnLocalFunction() { var test = BoilerPlate + @" @@ -183,7 +178,6 @@ static void LocalFunc() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseInLambdaWithIntrinsicsHelperAttributeOnOuterFunction() { var test = BoilerPlate + @" @@ -209,7 +203,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedUseInLocalFunctionWithIntrinsicsHelperAttributeOnLocalFunction() { var test = BoilerPlate + @" @@ -235,7 +228,6 @@ static void LocalFunc() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUnprotectedNestedTypeUse() { var test = BoilerPlate + @" @@ -275,7 +267,6 @@ static void FuncGood() [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementButWithInadequateHelperMethodAttribute() { var test = BoilerPlate + @" @@ -317,7 +308,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementWithNestedAndBaseTypeLookupRequired() { var test = BoilerPlate + @" @@ -337,7 +327,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithTernaryOperator() { var test = BoilerPlate + @" @@ -356,7 +345,6 @@ static bool FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementWithOrOperationCase() { var test = BoilerPlate + @" @@ -386,7 +374,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementWithOrOperationCaseWithImplicationProcessingRequired() { var test = BoilerPlate + @" @@ -416,7 +403,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementAroundLocalFunctionDefinition() { var test = BoilerPlate + @" @@ -446,7 +432,6 @@ void LocalFunction() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodWithIfStatementAroundLambdaFunctionDefinition() { var test = BoilerPlate + @" @@ -473,7 +458,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsCanOnlyBeCalledWithAppropriateIsSupportedChecksError() { var test = BoilerPlate + @" @@ -524,7 +508,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 +548,6 @@ static void FuncGood() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsUnrelatedPropertyDoesntHelp() { var test = BoilerPlate + @" @@ -596,7 +578,6 @@ static void FuncBad() } [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestHelperMethodsWithHelperProperty() { var test = BoilerPlate + @" @@ -627,7 +608,6 @@ static void FuncGood() [Fact] - [SkipOnPlatform(TestPlatforms.LinuxBionic, "https://github.com/dotnet/runtime/issues/93103")] public async Task TestMethodUseOfIntrinsicsFromWithinOtherMethodOnIntrinsicType() { var test = @" diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 0b0a75f1063ac..c41b47459532b 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -89,10 +89,13 @@ - + - + + + + @@ -330,19 +333,16 @@ - - -