@@ -283,39 +283,67 @@ public static partial class Methods
283
283
[ Test ]
284
284
public Task UnsignedIntBitshiftTest ( )
285
285
{
286
- var inputContents = @"#define LEFT 1 << 1U
287
- #define RIGHT 1 >> 1U
288
- #define INT 1 << 1
289
- #define LONG 1 << 1L
290
- #define LONGLONG 1 << 1LL
291
- #define ULONG 1 << 1UL
292
- #define ULONGLONG 1 << 1ULL
286
+ var inputContents = @"
287
+ const int Signed = 1;
288
+ const unsigned int Unsigned = 1U;
289
+
290
+ const int ShiftSigned = 1 << Signed;
291
+ const int ShiftUnsigned = 1 << Unsigned;
292
+
293
+ const int CInt = 1 << 1;
294
+ const int CUint = 1 << 1U;
295
+
296
+ #define Left 1 << 1U
297
+ #define Right 1 >> 1U
298
+ #define Int 1 << 1
299
+ #define Long 1 << 1L
300
+ #define LongLong 1 << 1LL
301
+ #define ULong 1 << 1UL
302
+ #define ULongLong 1 << 1ULL
293
303
" ;
294
304
295
305
var expectedOutputContents = @"namespace ClangSharp.Test
296
306
{
297
307
public static partial class Methods
298
308
{
299
- [NativeTypeName(""#define LEFT 1 << 1U "")]
300
- public const int LEFT = 1 << (int)(1U) ;
309
+ [NativeTypeName(""const int "")]
310
+ public const int Signed = 1;
301
311
302
- [NativeTypeName(""#define RIGHT 1 >> 1U "")]
303
- public const int RIGHT = 1 >> (int)(1U) ;
312
+ [NativeTypeName(""const unsigned int "")]
313
+ public const uint Unsigned = 1U ;
304
314
305
- [NativeTypeName(""#define INT 1 << 1 "")]
306
- public const int INT = 1 << 1 ;
315
+ [NativeTypeName(""const int "")]
316
+ public const int ShiftSigned = 1 << Signed ;
307
317
308
- [NativeTypeName(""#define LONG 1 << 1L "")]
309
- public const int LONG = 1 << (int)(1 );
318
+ [NativeTypeName(""const int "")]
319
+ public const int ShiftUnsigned = 1 << (int)(Unsigned );
310
320
311
- [NativeTypeName(""#define LONGLONG 1 << 1LL "")]
312
- public const int LONGLONG = 1 << (int)(1L) ;
321
+ [NativeTypeName(""const int "")]
322
+ public const int CInt = 1 << 1 ;
313
323
314
- [NativeTypeName(""#define ULONG 1 << 1UL "")]
315
- public const int ULONG = 1 << (int)(1U);
324
+ [NativeTypeName(""const int "")]
325
+ public const int CUint = 1 << (int)(1U);
316
326
317
- [NativeTypeName(""#define ULONGLONG 1 << 1ULL"")]
318
- public const int ULONGLONG = 1 << (int)(1UL);
327
+ [NativeTypeName(""#define Left 1 << 1U"")]
328
+ public const int Left = 1 << (int)(1U);
329
+
330
+ [NativeTypeName(""#define Right 1 >> 1U"")]
331
+ public const int Right = 1 >> (int)(1U);
332
+
333
+ [NativeTypeName(""#define Int 1 << 1"")]
334
+ public const int Int = 1 << 1;
335
+
336
+ [NativeTypeName(""#define Long 1 << 1L"")]
337
+ public const int Long = 1 << (int)(1);
338
+
339
+ [NativeTypeName(""#define LongLong 1 << 1LL"")]
340
+ public const int LongLong = 1 << (int)(1L);
341
+
342
+ [NativeTypeName(""#define ULong 1 << 1UL"")]
343
+ public const int ULong = 1 << (int)(1U);
344
+
345
+ [NativeTypeName(""#define ULongLong 1 << 1ULL"")]
346
+ public const int ULongLong = 1 << (int)(1UL);
319
347
}
320
348
}
321
349
" ;
0 commit comments