Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Chen <59190910+JeffInChrist@users.noreply.github.com>2021-04-30 22:23:09 +0300
committerGitHub <noreply@github.com>2021-04-30 22:23:09 +0300
commitb9158aa6bc4e958bbd243a0d4fbf109788c90e87 (patch)
tree800fca43c6d78a9915f398feadc74434466a82e1 /mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
parentd3ce3cadd68a78fbb11efe02afb9c160e07391e4 (diff)
Adding the projection of Numerics types in C++/WinRT, C++/CX and fixed an issue of the cppType logic (#550)
https://dev.azure.com/ceapex/Engineering/_workitems/edit/100023
Diffstat (limited to 'mdoc/mdoc.Test/CppCxFormatterTypesTests.cs')
-rw-r--r--mdoc/mdoc.Test/CppCxFormatterTypesTests.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs b/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
index d8bf6909..2bbd8390 100644
--- a/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
+++ b/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
@@ -13,6 +13,7 @@ namespace mdoc.Test
{
protected override CppCxMemberFormatter formatter => new CppCxMemberFormatter();
+ private string _cppWinRtTestLibName = "../../../../external/Windows/Windows.Foundation.UniversalApiContract.winmd";
private string _cppCxTestLibName = "../../../../external/Test/UwpTestWinRtComponentCpp.winmd";
protected override TypeDefinition GetType(Type type)
@@ -85,9 +86,74 @@ namespace mdoc.Test
TestTypeSignature(_cppCxTestLibName, "Namespace2.Class4", "public value class Class4");
}
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsMatrix3x2()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Matrix3x2", "public value class float3x2");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsMatrix4x4()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Matrix4x4", "public value class float4x4");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsQuaternion()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Quaternion", "public value class quaternion");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsVector2()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Vector2", "public value class float2");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsVector3()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Vector3", "public value class float3");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsVector4()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Vector4", "public value class float4");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_ValueGuid()
+ {
+ TestTypeSignature(typeof(Guid),
+ "public value class Platform::Guid : IComparable, IComparable<Platform::Guid>, IEquatable<Platform::Guid>, IFormattable");
+ }
+
+ [Test]
+ [Category("Type")]
+ public void TypeSignature_ValueSingle()
+ {
+ TestTypeSignature(typeof(Single),
+ "public value class float : IComparable, IComparable<float>, IConvertible, IEquatable<float>, IFormattable");
+ }
+
#region NoSupport
[Test]
+ [Category("Type")]
+ public void TypeSignature_NumericsPlane()
+ {
+ TestTypeSignature(_cppWinRtTestLibName, "Windows.Foundation.Numerics.Plane", null);
+ }
+
+ [Test]
[Category("NoSupport")]
public void NoSupport_GenericDelegate()
{