diff options
author | Dongyun Jin <dongyun.jin@samsung.com> | 2016-05-19 00:44:36 +0900 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-05-18 08:44:36 -0700 |
commit | b7704374e683a8d3644a0640010936a22296967a (patch) | |
tree | 3fb0b205cccd1cc1299a58e32a939862ab601054 /tests/src/Interop | |
parent | 4716d27c9550f4ce24f32e6248b4b350fe1e08ac (diff) | |
download | coreclr-b7704374e683a8d3644a0640010936a22296967a.tar.gz coreclr-b7704374e683a8d3644a0640010936a22296967a.tar.bz2 coreclr-b7704374e683a8d3644a0640010936a22296967a.zip |
Fix Interop TCs to use long long instead of long (#5054)
Some TCs were using long for 64bit variable.
While it is correct on x86, long is 32bit on ARM.
Fix TCs to use long long instead so that they can pass on ARM as well.
Fix #5053
Signed-off-by: Dongyun Jin <dongyun.jin@samsung.com>
Diffstat (limited to 'tests/src/Interop')
-rw-r--r-- | tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/src/Interop/common/types.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h b/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h index ead777eea0..bf767271fb 100644 --- a/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h +++ b/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h @@ -395,8 +395,8 @@ void PrintNumberSequential(NumberSequential* str, char const * name) printf("\t%s.sb = %d\n", name, str->sb); printf("\t%s.i16 = %d\n", name, str->i16); printf("\t%s.ui16 = %u\n", name, str->ui16); - printf("\t%s.i64 = %ld\n", name, str->i64); - printf("\t%s.ui64 = %lu\n", name, str->ui64); + printf("\t%s.i64 = %lld\n", name, str->i64); + printf("\t%s.ui64 = %llu\n", name, str->ui64); printf("\t%s.sgl = %f\n", name, str->sgl); printf("\t%s.d = %f\n",name, str->d); } @@ -773,8 +773,8 @@ void PrintU(U* str, char const * name) printf("\t%s.us = %u\n", name, str->us); printf("\t%s.b = %u\n", name, str->b); printf("\t%s.sb = %d\n", name, str->sb); - printf("\t%s.l = %ld\n", name, str->l); - printf("\t%s.ul = %lu\n", name, str->ul); + printf("\t%s.l = %lld\n", name, str->l); + printf("\t%s.ul = %llu\n", name, str->ul); printf("\t%s.f = %f\n", name, str->f); printf("\t%s.d = %f\n", name, str->d); } @@ -884,8 +884,8 @@ struct LongStructPack16Explicit // size = 16 bytes void PrintLongStructPack16Explicit(LongStructPack16Explicit* str, char const * name) { - printf("\t%s.l1 = %ld", name, str->l1); - printf("\t%s.l2 = %ld", name, str->l2); + printf("\t%s.l1 = %lld", name, str->l1); + printf("\t%s.l2 = %lld", name, str->l2); } void ChangeLongStructPack16Explicit(LongStructPack16Explicit* p) { diff --git a/tests/src/Interop/common/types.h b/tests/src/Interop/common/types.h index 097a2392e4..7d7f7768a6 100644..100755 --- a/tests/src/Interop/common/types.h +++ b/tests/src/Interop/common/types.h @@ -33,10 +33,10 @@ typedef WCHAR OLECHAR; typedef unsigned int UINT_PTR; -typedef unsigned long ULONG64; +typedef unsigned long long ULONG64; typedef double DOUBLE; typedef float FLOAT; -typedef signed long LONG64, *PLONG64; +typedef signed long long LONG64, *PLONG64; typedef int INT, *LPINT; typedef unsigned int UINT; typedef char CHAR, *PCHAR; |