Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit fa056ef

Browse files
Merge pull request #412 from xamarin/extension-descriptor
Extension descriptor
2 parents ae65650 + 68bcb8d commit fa056ef

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/tom-swifty-test/SwiftReflector/Swift4DemanglerTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,5 +1596,18 @@ public void MethodDescriptor0 ()
15961596
var methodDesc = tld as TLMethodDescriptor;
15971597
Assert.IsNotNull (methodDesc, "not a method descriptor");
15981598
}
1599+
1600+
[Test]
1601+
public void TestExtensionDescriptor ()
1602+
{
1603+
var tld = Decomposer.Decompose ("_$sSi16MySwiftFrameworkE8timesTwoSivpMV", false);
1604+
Assert.IsNotNull (tld, "failed decomposition");
1605+
var pd = tld as TLPropertyDescriptor;
1606+
Assert.IsNotNull (pd, "not a property descriptor");
1607+
Assert.IsNotNull (pd.ExtensionOn, "no extension");
1608+
var onType = pd.ExtensionOn as SwiftBuiltInType;
1609+
Assert.IsNotNull (onType, "not a built in type");
1610+
Assert.AreEqual (CoreBuiltInType.Int, onType.BuiltInType, "not an int");
1611+
}
15991612
}
16001613
}

0 commit comments

Comments
 (0)