You've already forked linux-packaging-mono
Imported Upstream version 6.6.0.89
Former-commit-id: b39a328747c2f3414dc52e009fb6f0aa80ca2492
This commit is contained in:
parent
cf815e07e0
commit
95fdb59ea6
@@ -174,6 +174,95 @@ public struct AStruct : ITest2 {
|
||||
}
|
||||
}
|
||||
|
||||
public struct int4
|
||||
{
|
||||
public int w, x, y, z;
|
||||
|
||||
public int4(int w, int x, int y, int z)
|
||||
{
|
||||
this.w = w;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public struct char4
|
||||
{
|
||||
public int w, x, y, z;
|
||||
|
||||
public char4(char w, char x, char y, char z)
|
||||
{
|
||||
this.w = w;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe struct NodeTestFixedArray
|
||||
{
|
||||
private fixed short buffer[4];
|
||||
private fixed char buffer2[4];
|
||||
|
||||
public int4 Buffer
|
||||
{
|
||||
set
|
||||
{
|
||||
fixed (NodeTestFixedArray* p = &this) {
|
||||
p->buffer[0] = (short)value.w;
|
||||
p->buffer[1] = (short)value.x;
|
||||
p->buffer[2] = (short)value.y;
|
||||
p->buffer[3] = (short)value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
public char4 Buffer2
|
||||
{
|
||||
set
|
||||
{
|
||||
fixed (NodeTestFixedArray* p = &this) {
|
||||
p->buffer2[0] = (char)value.w;
|
||||
p->buffer2[1] = (char)value.x;
|
||||
p->buffer2[2] = (char)value.y;
|
||||
p->buffer2[3] = (char)value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
public String getBuffer0() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Convert.ToString(p->buffer[0]);
|
||||
}
|
||||
public String getBuffer1() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Convert.ToString(p->buffer[1]);
|
||||
}
|
||||
public String getBuffer2() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Convert.ToString(p->buffer[2]);
|
||||
}
|
||||
public String getBuffer3() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Convert.ToString(p->buffer[3]);
|
||||
}
|
||||
public String getBuffer2_0() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Char.ToString(p->buffer2[0]);
|
||||
}
|
||||
public String getBuffer2_1() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Char.ToString(p->buffer2[1]);
|
||||
}
|
||||
public String getBuffer2_2() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Char.ToString(p->buffer2[2]);
|
||||
}
|
||||
public String getBuffer2_3() {
|
||||
fixed (NodeTestFixedArray* p = &this)
|
||||
return Char.ToString(p->buffer2[3]);
|
||||
}
|
||||
}
|
||||
|
||||
public struct BlittableStruct {
|
||||
public int i;
|
||||
@@ -494,6 +583,7 @@ public class Tests : TestsBase, ITest2
|
||||
field_with_unsafe_cast_value();
|
||||
inspect_enumerator_in_generic_struct();
|
||||
if_property_stepping();
|
||||
fixed_size_array();
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -730,6 +820,13 @@ public class Tests : TestsBase, ITest2
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void fixed_size_array () {
|
||||
var n = new NodeTestFixedArray();
|
||||
n.Buffer = new int4(1, 2, 3, 4);
|
||||
n.Buffer2 = new char4('a', 'b', 'c', 'd');
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void inspect_enumerator_in_generic_struct() {
|
||||
TestEnumeratorInsideGenericStruct<String, String> generic_struct = new TestEnumeratorInsideGenericStruct<String, String>(new KeyValuePair<string, string>("0", "f1"));
|
||||
|
||||
@@ -1 +1 @@
|
||||
1f394d53c53a481ed108fe1e55be458a7fb03923
|
||||
75967555e6b2fb9903c055d496b749f56798e897
|
||||
Reference in New Issue
Block a user