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

Commit e9e24e5

Browse files
Merge pull request #427 from xamarin/more-descriptors
test all the method descriptors
2 parents cd514a8 + 1edd017 commit e9e24e5

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,5 +1679,55 @@ public void TestAssociatedTypeDescriptor2 ()
16791679
Assert.AreEqual ("InlineRow", atdesc.AssociatedTypeName.Name, "wrong associated type name");
16801680
Assert.AreEqual ("Eureka.InlineRowType", atdesc.Class.ClassName.ToFullyQualifiedName (), "protocol name mismatch");
16811681
}
1682+
1683+
[Test]
1684+
public void TestMoreMethodDescriptor0 ()
1685+
{
1686+
var tld = Decomposer.Decompose ("_$s14ClassWrapTests10GarbleWCRCCACycfCTq", false);
1687+
Assert.IsNotNull (tld, "failed decomposition");
1688+
var md = tld as TLMethodDescriptor;
1689+
Assert.IsNotNull (md, "not a method descriptor");
1690+
Assert.AreEqual ("GarbleWCRC", md.Name.Name, "name mismatch");
1691+
}
1692+
1693+
[Test]
1694+
public void TestMoreMethodDescriptor1 ()
1695+
{
1696+
var tld = Decomposer.Decompose ("_$s14ClassWrapTests11MontyWMMIntCACycfCTq", false);
1697+
Assert.IsNotNull (tld, "failed decomposition");
1698+
var md = tld as TLMethodDescriptor;
1699+
Assert.IsNotNull (md, "not a method descriptor");
1700+
Assert.AreEqual ("MontyWMMInt", md.Name.Name, "name mismatch");
1701+
}
1702+
1703+
[Test]
1704+
public void TestMoreMethodDescriptor2 ()
1705+
{
1706+
var tld = Decomposer.Decompose ("_$s14ClassWrapTests11MontyWSMIntCACycfCTq", false);
1707+
Assert.IsNotNull (tld, "failed decomposition");
1708+
var md = tld as TLMethodDescriptor;
1709+
Assert.IsNotNull (md, "not a method descriptor");
1710+
Assert.AreEqual ("MontyWSMInt", md.Name.Name, "name mismatch");
1711+
}
1712+
1713+
[Test]
1714+
public void TestMoreMethodDescriptor3 ()
1715+
{
1716+
var tld = Decomposer.Decompose ("_$s14ClassWrapTests11MontyWSPIntCACycfCTq", false);
1717+
Assert.IsNotNull (tld, "failed decomposition");
1718+
var md = tld as TLMethodDescriptor;
1719+
Assert.IsNotNull (md, "not a method descriptor");
1720+
Assert.AreEqual ("MontyWSPInt", md.Name.Name, "name mismatch");
1721+
}
1722+
1723+
[Test]
1724+
public void TestMorePropertyDescriptor0 ()
1725+
{
1726+
var tld = Decomposer.Decompose ("_$s14ClassWrapTests11MontyWSPIntC3valSivpMV", false);
1727+
Assert.IsNotNull (tld, "failed decomposition");
1728+
var pd = tld as TLPropertyDescriptor;
1729+
Assert.IsNotNull (pd, "not a property descriptor");
1730+
Assert.AreEqual ("val", pd.Name.Name, "name mismatch");
1731+
}
16821732
}
16831733
}

0 commit comments

Comments
 (0)