summaryrefslogtreecommitdiff
path: root/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs')
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs
index eac0ab60d7..6882ad0489 100644
--- a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs
@@ -210,7 +210,17 @@ public class MarshalSizeOf2
try
{
Type obj = typeof(TestMultiMemberStruct1);
- int expectedSize = 16; // sizeof(double) + sizeof(int) + padding
+ int expectedSize;
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || (RuntimeInformation.ProcessArchitecture != Architecture.X86))
+ {
+ expectedSize = 16; // sizeof(double) + sizeof(int) + padding
+ }
+ else
+ {
+ // The System V ABI for i386 defines double as having 4-byte alignment
+ expectedSize = 12; // sizeof(double) + sizeof(int)
+ }
int actualSize = Marshal.SizeOf(obj);