Skip to content

Commit

Permalink
Move downlevel tests to outerloop (#103595)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed Jun 19, 2024
1 parent c2e1bdc commit 796a79f
Showing 1 changed file with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -707,22 +707,35 @@ private static string RemoveTestMarkup(string sourceWithMarkup)
return sourceWithoutMarkup;
}

public static IEnumerable<object[]> CodeSnippetsToVerifyNoTreesProduced()
[Fact]
public async Task ValidateNoGeneratedOutputForNoImport()
{
string source = """
using System.Runtime.InteropServices;
public class Basic { }
""";
yield return new object[] { ID(), source, TestTargetFramework.Standard };
yield return new object[] { ID(), source, TestTargetFramework.Framework };
yield return new object[] { ID(), source, TestTargetFramework.Net };

var test = new NoChangeTest(TestTargetFramework.Net)
{
TestCode = source,
TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck
};

await test.RunAsync();
}


[OuterLoop("Uses the network for downlevel ref packs")]
[InlineData(TestTargetFramework.Standard)]
[InlineData(TestTargetFramework.Framework)]
[Theory]
[MemberData(nameof(CodeSnippetsToVerifyNoTreesProduced))]
public async Task ValidateNoGeneratedOutputForNoImport(string id, string source, TestTargetFramework framework)
public async Task ValidateNoGeneratedOutputForNoImportDownlevel(TestTargetFramework framework)
{
TestUtils.Use(id);
string source = """
using System.Runtime.InteropServices;
public class Basic { }
""";

var test = new NoChangeTest(framework)
{
TestCode = source,
Expand Down

0 comments on commit 796a79f

Please sign in to comment.