summaryrefslogtreecommitdiff
path: root/tests/src/Interop
diff options
context:
space:
mode:
authorYi Zhang <yzha@microsoft.com>2016-08-03 22:03:53 -0700
committerYi Zhang <yzha@microsoft.com>2016-08-04 14:06:50 -0700
commitc71a30805870a7e34d82445d59a0ab536232e383 (patch)
tree1bba1ef5e5a520ce4794d81911e9d0c30038ed77 /tests/src/Interop
parent3208afd28dc879f4de845d052ca90423a8bcb5ca (diff)
downloadcoreclr-c71a30805870a7e34d82445d59a0ab536232e383.tar.gz
coreclr-c71a30805870a7e34d82445d59a0ab536232e383.tar.bz2
coreclr-c71a30805870a7e34d82445d59a0ab536232e383.zip
Fix warnings in interop tests and disable IsComObject(null) scenario as it is failing in non-Windows
Diffstat (limited to 'tests/src/Interop')
-rw-r--r--tests/src/Interop/MarshalAPI/GetNativeVariantForObject/GetNativeVariantForObject.csproj1
-rw-r--r--tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.cs13
-rw-r--r--tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.csproj1
-rw-r--r--tests/src/Interop/MarshalAPI/OffsetOf/OffsetOf.csproj1
-rw-r--r--tests/src/Interop/MarshalAPI/UnsafeAddrOfPinnedArrayElement/UnsafeAddrOfPinnedArrayElement.csproj1
5 files changed, 10 insertions, 7 deletions
diff --git a/tests/src/Interop/MarshalAPI/GetNativeVariantForObject/GetNativeVariantForObject.csproj b/tests/src/Interop/MarshalAPI/GetNativeVariantForObject/GetNativeVariantForObject.csproj
index c4737801f3..8d1987a9ca 100644
--- a/tests/src/Interop/MarshalAPI/GetNativeVariantForObject/GetNativeVariantForObject.csproj
+++ b/tests/src/Interop/MarshalAPI/GetNativeVariantForObject/GetNativeVariantForObject.csproj
@@ -16,6 +16,7 @@
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ <NoWarn>0618;0649</NoWarn>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
diff --git a/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.cs b/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.cs
index 7e65a31fc6..b184020d18 100644
--- a/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.cs
+++ b/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.cs
@@ -56,9 +56,7 @@ class MarshalClassTests
int retVal = 100;
IntPtr ip;
- Object o;
SomeTestStruct someTs = new SomeTestStruct();
- StructWithFxdLPSTRSAFld someTs_FxdLPSTR = new StructWithFxdLPSTRSAFld();
#if BUG_876976
Console.WriteLine("Testing SizeOf...");
@@ -308,7 +306,7 @@ class MarshalClassTests
Console.WriteLine("\n\tPassing structure that has no layout and CANNOT be marshaled");
try
{
- Marshal.SizeOf(someTs_FxdLPSTR.GetType());
+ Marshal.SizeOf(typeof(StructWithFxdLPSTRSAFld));
retVal = 0;
Console.WriteLine("\t\tNO EXCEPTION THROWN! FAILED!");
}
@@ -371,7 +369,7 @@ class MarshalClassTests
Console.WriteLine("\n\tPassing structure that has no layout and CANNOT be marshaled");
try
{
- Marshal.OffsetOf(someTs_FxdLPSTR.GetType(), "Arr");
+ Marshal.OffsetOf(typeof(StructWithFxdLPSTRSAFld), "Arr");
retVal = 0;
Console.WriteLine("\t\tNO EXCEPTION THROWN! FAILED!");
}
@@ -493,6 +491,7 @@ class MarshalClassTests
Console.WriteLine("DONE testing Copy.");
+#if ISSUE_6605
//////////////////////////////////////////////////////////////
//IsComObject
/////////////////////////////////////////////////////////////
@@ -513,9 +512,9 @@ class MarshalClassTests
retVal = 0;
Console.WriteLine("\t\tUNEXPECTED EXCEPTION:\n\t\t\t" + e.ToString());
}
-
+#endif
Console.WriteLine("DONE testing IsComObject.");
- return 100;
+ return retVal;
}
-} \ No newline at end of file
+}
diff --git a/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.csproj b/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.csproj
index b1f8120690..0a0128214d 100644
--- a/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.csproj
+++ b/tests/src/Interop/MarshalAPI/Miscellaneous/MarshalClassTests.csproj
@@ -16,6 +16,7 @@
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ <NoWarn>0618;0649</NoWarn>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
diff --git a/tests/src/Interop/MarshalAPI/OffsetOf/OffsetOf.csproj b/tests/src/Interop/MarshalAPI/OffsetOf/OffsetOf.csproj
index 89a27dac54..4eb1473638 100644
--- a/tests/src/Interop/MarshalAPI/OffsetOf/OffsetOf.csproj
+++ b/tests/src/Interop/MarshalAPI/OffsetOf/OffsetOf.csproj
@@ -16,6 +16,7 @@
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ <NoWarn>0618;0649;0169</NoWarn>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
diff --git a/tests/src/Interop/MarshalAPI/UnsafeAddrOfPinnedArrayElement/UnsafeAddrOfPinnedArrayElement.csproj b/tests/src/Interop/MarshalAPI/UnsafeAddrOfPinnedArrayElement/UnsafeAddrOfPinnedArrayElement.csproj
index 9ebc16dae7..5f1140e22b 100644
--- a/tests/src/Interop/MarshalAPI/UnsafeAddrOfPinnedArrayElement/UnsafeAddrOfPinnedArrayElement.csproj
+++ b/tests/src/Interop/MarshalAPI/UnsafeAddrOfPinnedArrayElement/UnsafeAddrOfPinnedArrayElement.csproj
@@ -16,6 +16,7 @@
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ <NoWarn>0618</NoWarn>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">