Skip to content

Commit 451618e

Browse files
[RGen] Fix extension tests to work when iOS is not enabled. (#23471)
We are doing a compilation step in the test, therefore we need to use the AllSupportedPlatformsClassData attribute to get the enabled platforms that will be used to run the tests.
1 parent 266a767 commit 451618e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/MemberDeclarationSyntaxExtensionsTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ public class TestClass {
235235
}
236236

237237
[Theory]
238-
[ClassData (typeof (GetBindingTypeTestData))]
239-
void GetBindingType (string input, BindingType expectedBindingType)
238+
[AllSupportedPlatformsClassData<GetBindingTypeTestData>]
239+
void GetBindingType (ApplePlatform platform, string input, BindingType expectedBindingType)
240240
{
241-
var (compilation, sourceTrees) = CreateCompilation (ApplePlatform.iOS, sources: [input]);
241+
var (compilation, sourceTrees) = CreateCompilation (platform, sources: [input]);
242242
Assert.Single (sourceTrees);
243243
var classDeclaration = sourceTrees [0].GetRoot ()
244244
.DescendantNodes ()

0 commit comments

Comments
 (0)