summaryrefslogtreecommitdiff
path: root/tests/src/Interop
AgeCommit message (Collapse)AuthorFilesLines
2017-09-20Test marshaling IntPtr.Zero to UTF8 strings, add unit testsFrederik Carlier1-0/+19
2017-08-16Move less valuable tests to priority 1.Pat Gavlin16-146/+116
2017-08-09typo (#13287)John Doe1-1/+1
2017-06-28Remove disabled tests for Marshal.IsComObject(null) (#12359)Hugh Bellamy1-24/+0
2017-06-12Disable some GC testswtgodbe5-0/+15
2017-05-02Enable Marshal.SecureStringToBSTR and Marshal.ZeroFreeBSTR on Unix (#11234)John Bottenberg1-0/+34
2017-04-29Bring back Marshal.Read/Write overloads that takes object (#11251)Yi Zhang (CLR)2-0/+156
* Bring back desktop version of Marshal.Read/Write APIs that takes object and add a test
2017-04-27Fix unittest `LPSTRTest` (#11096)Hanjoung Lee2-7/+26
* Fix unittest `LPSTRTest` The test case Interop.StringMarshalling.LPSTR.LPSTRTest always returned exit code 100(pass) even if it actually failed. This implements `ExitTest()` in the same manner with `LPTSTRTest`. * Fix unittest `LPSTRTest` native
2017-04-19Stop treating test files as executable and fix encoding (#11065)Yi Zhang (CLR)9-3/+3
* change encoding to UTF-8 * change line ending to UNIX * remove executable attribute
2017-04-16Fix warning in LPTSTRTestNative (#10973)Yi Zhang (CLR)2-24/+26
* Fix warning in LPTSTRTestNative and add support for wcsncmp in xplatform.h
2017-03-29Fix path to CoreCLRTestLibrary from SizeConstTestJoseph Tremoulet1-1/+1
The reference path had one too many `..`s.
2017-03-17Delete unused ReferenceLocalMscorlib property from test proj files (#10250)Jan Kotas43-174/+0
Deleted a few other irrelevant properties as well while I was on it. Fixes #7711
2017-03-16Delete mscorlib facade (#10157)Jan Kotas4-2/+6
Fixes #7607
2017-03-08Revise Interop TC Calling Convention (#10014)Jonghyun Park10-191/+205
2017-02-06Android - Fix duplicate definitions of INT_MIN and PAGE_SIZE in unit tests ↵Frederik Carlier1-0/+1
(#9172) * Don't refdefine PAGE_SIZE on Android * Don't re-declare INT_MIN on Android * Fixup
2016-11-26Fix building CoreCLR with Clang 3.9 (#8311)Jan Vorlicek1-2/+2
There were few constructs that Clang 3.9 didn't like due to its strict C++ standard conformance rules.
2016-11-19Fix warnings in native test codeMike Danes4-166/+64
2016-10-28C++ conformance. (building with /permissive-) (#7855)Phil Christensen2-2/+4
These issues were found when building with the /permissive- flag in the latest version of MSVC. No tests were added/modified because this does not change any behavior. There are a few types of language conformance issues fixed in this: 1) Strict string conversion (this is also covered by the /Zc:strictStrings flag) The 'const' is not implicitly dropped by string literals, which means the following is not allowed: char str = "const string literal"; //error: cannot convert a 'const char' to a 'char*' This fix to to make str 'const char*'. (This can have a domino effect depending on where str is used) 2) Fully qualified inline declarations members inside class struct A { void A::f() { } // Error: illegal qualified name in member declaration, remove redundant 'A::' to fix }; 3) MSVC by default will allows name lookup in a dependent base. This is disabled by /permissive- template <class T> struct B { void f(); }; template <class T> struct D : public B<T> //B is a dependent base because its type depends on the type of T in D<T>. { //One possible fix is to uncomment the following line. If this //were a type we should have 'using typename'... //using B<T>::f; void g() { f(); //Error: identifier not found, one possible fix is change it to 'this->f();' } }; void h() { D<int> d; d.g(); } 4) Warning 4800 has been removed in version 19.1 (1910) of the compiler. For backwards compatability, surround the usage of 4800. This is not related to C++ conformance. #if _MSC_VER <= 1900 // 'BOOL' forcing value to bool 'true' or 'false' #pragma warning(disable: 4800) #endif
2016-10-17Fix calling conventions in ByValArray test.Pat Gavlin1-65/+65
The managed code was assuming WINAPI, but the native code was defaulting to cdecl. This causes GC stress failures on x86.
2016-10-13Fix a calling convention in SimpleStructNative.Pat Gavlin1-1/+1
The managed code expects `GetFptr` to have the `stdcall` calling convention. Because of the mismatch, the JIT-generated code was not cleaning up the stack after P/Invoking to this function on x86, which was causing a failure during GC stress.
2016-08-25Enable Arm32 Test BuildGaurav Khanna15-0/+22
2016-08-23Bulk moving Tests to use uber project.jsonRama Krishnan Raghupathy75-1473/+0
2016-08-04Fix warnings in interop tests and disable IsComObject(null) scenario as it ↵Yi Zhang5-7/+10
is failing in non-Windows
2016-07-29Using full versions, update CoreFX dependencies to beta-24328-05.Davis Goodin30-762/+886
To fix tests, change dnxcore50 -> netcoreapp1.0 and add test_runtime.
2016-07-07MarshalAs(UnManaged.ByValArray) overflow.Tijoy Tom Kalathiparambil9-0/+419
For non-blittable embedded array in structs we ignored the SizeConst and wrote past the buffer when number of elementsin the arrayis greater than SizeConst.Fix is to truncate the array at SizeConst MarshalAs(UnManaged.ByValTStr) Very subtle case when the SizeConst == Number of bytes required to marshal , we write the null one past the buffer.This happens only on machine with non-english (multi-byte) locale as default. Fix is to check the number of bytes required and truncate the correctly leaving space for the terminating null.
2016-05-22Update tests to build against rc3-24117-00 (#5154)Jan Kotas28-460/+460
2016-05-19Fix case-sensitive issue on Linux (#5086)Jiyoung Giuliana Yun24-24/+24
Fix #5035 The file paths should be case-sensitive on Linux. Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
2016-05-18Fix Interop TCs to use long long instead of long (#5054)Dongyun Jin2-8/+8
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>
2016-05-13Renaming the API StringToCoTaskMemUTF8 since wetijoytk1-1/+1
need to be consistent with existing one.Also fixing a merge conflict.
2016-05-12Marshaling helpers for MarshalAs LPUTF8Str.tijoytk4-137/+106
2016-05-10Cleaning up a bunch of warnings.tijoytk1-313/+319
2016-05-10Merge pull request #4793 from tijoytom/mastertijoytom6-0/+610
UTF8 Marshaling support(UnmanagedType.LPUTF8Str)
2016-05-09Taking care of review comments.tijoytk2-11/+6
Let out some of the review comments since they are optimizations.
2016-05-07Merge pull request #4747 from krytarowski/netbsd-support-75Aditya Mandaleeka1-2/+2
NetBSD: Fix build with LLVM-3.9
2016-05-06UTF8 Marshaling support(UnmanagedType.LPUTF8Str)Tijoy Tom Kalathiparambil6-0/+394
Usage: [MarshalAs(UnmanagedType.LPUTF8Str)] applied to string and stringbuilder. Implementation mostly use Encoding.UTF8 API to do the byte buffer to string roundtripping. Introducing two new marshalers, UTF8StringMarshaler and UTF8BufferMarshaler which handle string and StringBuilder respectively. [Out] StringBuilder marshaling use builder capacity as the buffer size ie (builder. Capacity + 1) *3 which is enough for any UTF8 char in BMP plane, infact Encoding.UTF8 mscorlib APIs use the same length.All marshaling flags(ThrowOnUnmapable, defaultchar) are ignored since they do not make sense in UTF16 to UTD8 context. The public contracts are not yet updated, the public contracts and public marshaling API (Marshal.PtrToStringUtf8 and StringToHGlobalUtf8) will be added once the implementation is in. The marshal api are anyway going to be a wrapper around Encoding.GetBytes and GetChars.
2016-05-03Fix calling convention mismatch in 7 interop tests and enable ↵Yi Zhang (CLR)9-19/+19
[NativeCallable] in all architectures.
2016-05-03NetBSD: Fix build with LLVM-3.9Kamil Rytarowski1-2/+2
2016-05-01Fix warningsYi Zhang (CLR)2-12/+19
2016-04-14Merge pull request #4308 from joperezr/RemoveWarningsJose Perez Rodriguez27-20/+261
Remove native build warnings
2016-04-14Updating BuildToolsJose Perez Rodriguez27-20/+261
2016-04-13Merge pull request #4297 from tijoytom/mastertijoytom11-18/+32
Disabling the failing struct by value scenario.
2016-04-13Disabling the failing struct by value scenario.Tijoy Tom Kalathiparambil11-18/+32
2016-04-09Merge pull request #4250 from yizhang82/nativevariant_fixYi Zhang (CLR)1-5/+29
Fix GetObjectForNativeVariant test issue. It should roundtrip the actual object instead of IntPtr. Also add proper variant clean up code. Fix #4192.
2016-04-09Merge pull request #4256 from yizhang82/chararray_fixYi Zhang (CLR)8-16/+16
Change Marshal.SizeOf to sizeof to calculate buffer size because Marshal.Copy copies managed contents, while Marshal.SizeOf gives native size. Fix #4254
2016-04-09Change Marshal.SizeOf to sizeof because Marshal.Copy copies managed contents ↵Yi Zhang (CLR)8-16/+16
and does not do marshalling.
2016-04-09Fix GetObjectForNativeVariant test issue. It should roundtrip the actual ↵Yi Zhang (CLR)1-5/+29
object instead of IntPtr. Also add proper variant clean up code. NOTE that I had to keep Marshal.IUnknownForObject call to force COM initialization.
2016-04-09Fix LPTSTRTest failure - it has a incorrect constant probably due to bad ↵Yi Zhang (CLR)1-2/+2
porting. Also remove StringMarshal tests from issues.targets
2016-04-08Merge branch 'port_interop_tests' of https://github.com/botaberg/coreclr ↵Tijoy Tom Kalathiparambil27-1/+8243
into botaberg-port_interop_tests
2016-04-08Merge pull request #4164 from yizhang82/lpstr_test_fixtijoytom1-1/+3
Fix LPSTR test failure due to incorrect implementation of strncpy_s.
2016-04-08Merge pull request #4160 from tijoytom/mastertijoytom20-0/+1542
Windows specific Marshal APIs test.