C#: Add more InlineArray test cases.

This commit is contained in:
Michael Nebel
2024-01-18 09:31:32 +01:00
parent 70e7c92774
commit 1d88ca2388
3 changed files with 45 additions and 0 deletions

View File

@@ -1,2 +1,5 @@
| types.cs:60:19:60:31 | MyInlineArray | Int32 | 1 | 10 |
| types.cs:66:19:66:47 | MyMultiDimensionalInlineArray | MyInlineArray | 2 | 5 |
| types.cs:72:19:72:48 | MyMultiDimensionalInlineArray2 | String[] | 2 | 7 |
| types.cs:78:19:78:48 | MyMultiDimensionalInlineArray3 | Object[,] | 2 | 4 |
| types.cs:84:19:84:48 | MyMultiDimensionalInlineArray4 | Object[][] | 3 | 11 |

View File

@@ -121,3 +121,27 @@ types.cs:
# 65| 0: [IntLiteral] 5
# 68| 5: [Field] myMultiDimentionalInlineArrayElements
# 68| -1: [TypeMention] MyInlineArray
# 72| 12: [InlineArrayType] MyMultiDimensionalInlineArray2
#-----| 0: (Attributes)
# 71| 1: [DefaultAttribute] [InlineArray(...)]
# 71| -1: [TypeMention] InlineArrayAttribute
# 71| 0: [IntLiteral] 7
# 74| 5: [Field] myMultiDimentionalInlineArrayElements
# 74| -1: [TypeMention] String[]
# 74| 1: [TypeMention] string
# 78| 13: [InlineArrayType] MyMultiDimensionalInlineArray3
#-----| 0: (Attributes)
# 77| 1: [DefaultAttribute] [InlineArray(...)]
# 77| -1: [TypeMention] InlineArrayAttribute
# 77| 0: [IntLiteral] 4
# 80| 5: [Field] myMultiDimentionalInlineArrayElements
# 80| -1: [TypeMention] Object[,]
# 80| 1: [TypeMention] object
# 84| 14: [InlineArrayType] MyMultiDimensionalInlineArray4
#-----| 0: (Attributes)
# 83| 1: [DefaultAttribute] [InlineArray(...)]
# 83| -1: [TypeMention] InlineArrayAttribute
# 83| 0: [IntLiteral] 11
# 86| 5: [Field] myMultiDimentionalInlineArrayElements
# 86| -1: [TypeMention] Object[][]
# 86| 1: [TypeMention] object

View File

@@ -67,4 +67,22 @@ namespace Types
{
private MyInlineArray myMultiDimentionalInlineArrayElements;
}
[System.Runtime.CompilerServices.InlineArray(7)]
public struct MyMultiDimensionalInlineArray2
{
private string[] myMultiDimentionalInlineArrayElements;
}
[System.Runtime.CompilerServices.InlineArray(4)]
public struct MyMultiDimensionalInlineArray3
{
private object[,] myMultiDimentionalInlineArrayElements;
}
[System.Runtime.CompilerServices.InlineArray(11)]
public struct MyMultiDimensionalInlineArray4
{
private object[][] myMultiDimentionalInlineArrayElements;
}
}