@@ -297,7 +297,7 @@ public void CSharpTuple()
297297 var member = GetMethod ( typeof ( NullablesAndTuples ) , m => m . Name == "TupleReturn" ) ;
298298 var formatter = new CSharpFullMemberFormatter ( ) ;
299299 var sig = formatter . GetDeclaration ( member ) ;
300- Assert . AreEqual ( "public (int,string) TupleReturn ();" , sig ) ;
300+ Assert . AreEqual ( "public (int, string) TupleReturn ();" , sig ) ;
301301 }
302302
303303 [ Test ]
@@ -425,27 +425,27 @@ public void CSharpTupleNamesTypeTest()
425425 {
426426 var type = GetType ( typeof ( SampleClasses . TupleNamesTestClass < , > ) ) ;
427427 var typeSignature = formatter . GetDeclaration ( type ) ;
428- Assert . AreEqual ( "public class TupleNamesTestClass<T1,T2> : IComparable<(T1,T2)>" , typeSignature ) ;
428+ Assert . AreEqual ( "public class TupleNamesTestClass<T1,T2> : IComparable<(T1, T2)>" , typeSignature ) ;
429429 }
430430
431431 [ Test ]
432432 public void CSharpTupleNamesPropertyTest ( )
433433 {
434434 var property = GetProperty ( typeof ( SampleClasses . TupleNamesTestClass < , > ) , m => m . Name == "TuplePropertyType" ) ;
435435 var propertySignature = formatter . GetDeclaration ( property ) ;
436- Assert . AreEqual ( "public (int a,int b) TuplePropertyType { get; }" , propertySignature ) ;
436+ Assert . AreEqual ( "public (int a, int b) TuplePropertyType { get; }" , propertySignature ) ;
437437 }
438438
439439 [ Test ]
440440 public void CSharpTupleNamesFieldTest ( )
441441 {
442442 var field = GetField ( GetType ( typeof ( SampleClasses . TupleNamesTestClass < , > ) ) , "TupleField" ) ;
443443 var fieldSignature = formatter . GetDeclaration ( field ) ;
444- Assert . AreEqual ( "public (int a,int b,int c) TupleField;" , fieldSignature ) ;
444+ Assert . AreEqual ( "public (int a, int b, int c) TupleField;" , fieldSignature ) ;
445445 }
446446
447- [ TestCase ( "TupleMethod" , "public (int a,int,int b) TupleMethod ((int,int) t1, (int b,int c,int d) t2, (int,int) t3);" ) ]
448- [ TestCase ( "RecursiveTupleMethod" , "public ((int a,long b) c,int d) RecursiveTupleMethod ((((int a,long) b,string c) d,(int e,(float f,float g) h) i,int j) t);" ) ]
447+ [ TestCase ( "TupleMethod" , "public (int a, int, int b) TupleMethod ((int, int) t1, (int b, int c, int d) t2, (int, int) t3);" ) ]
448+ [ TestCase ( "RecursiveTupleMethod" , "public ((int a, long b) c, int d) RecursiveTupleMethod ((((int a, long) b, string c) d, (int e, (float f, float g) h) i, int j) t);" ) ]
449449 public void CSharpTupleNamesMethodTest ( string methodName , string expectedSignature )
450450 {
451451 var method = GetMethod ( typeof ( SampleClasses . TupleNamesTestClass < , > ) , m => m . Name == methodName ) ;
@@ -464,6 +464,25 @@ public void CSharpInitOnlySetterTest(string propertyName, string expectedSignatu
464464 Assert . AreEqual ( expectedSignature , propertySignature ) ;
465465 }
466466
467+ [ Test ]
468+ public void CSharpNativeIntGenericTypeTest ( )
469+ {
470+ var type = GetType ( typeof ( SampleClasses . GenericNativeIntClass < > ) ) ;
471+ var typeSignature = formatter . GetDeclaration ( type ) ;
472+ Assert . AreEqual ( "public class GenericNativeIntClass<nint>" , typeSignature ) ;
473+ }
474+
475+ [ TestCase ( "Method1" , "public (nint, nuint) Method1 (nint a, nuint b, IntPtr c, UIntPtr d);" ) ]
476+ [ TestCase ( "Method2" , "public (nint, nuint) Method2 (List<nint> a, Dictionary<int,nuint> b);" ) ]
477+ [ TestCase ( "Method3" , "public (nint, nuint) Method3 ((nint, nuint) a, (nuint, IntPtr) b, (UIntPtr, string) c);" ) ]
478+ [ TestCase ( "Method4" , "public (((nint a, IntPtr) b, UIntPtr c) d, (nint e, (nuint f, IntPtr g) h) i) Method4 ();" ) ]
479+ public void CSharpNativeIntMethodTest ( string methodName , string expectedSignature )
480+ {
481+ var method = GetMethod ( typeof ( SampleClasses . NativeIntClass ) , m => m . Name == methodName ) ;
482+ var methodSignature = formatter . GetDeclaration ( method ) ;
483+ Assert . AreEqual ( expectedSignature , methodSignature ) ;
484+ }
485+
467486 #region Helper Methods
468487 string RealTypeName ( string name ) {
469488 switch ( name ) {
0 commit comments