From: Jeremy Koritzinsky Date: Fri, 7 Jun 2019 02:58:08 +0000 (-0700) Subject: Delete CoreFX tests of COM lifetime control methods. (dotnet/corefx#38290) X-Git-Tag: submit/tizen/20210909.063632~11031^2~1367 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a01d6d345f03d37dcd21ba6d18fc32b6d8acb2a6;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Delete CoreFX tests of COM lifetime control methods. (dotnet/corefx#38290) * Delete CoreFX tests of COM lifetime control methods. * Remove deleted files from project file. Commit migrated from https://github.com/dotnet/corefx/commit/500e6882a78c92ecfd584bd4d8ba8e49f4410eb7 --- diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj index 5f134d8..52c8edd 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj @@ -54,11 +54,9 @@ - - diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AreComObjectsAvailableForCleanupTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AreComObjectsAvailableForCleanupTests.cs deleted file mode 100644 index f4db8c0..0000000 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/AreComObjectsAvailableForCleanupTests.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Xunit; - -namespace System.Runtime.InteropServices.Tests -{ - public class AreComObjectsAvailableForCleanupTests - { - [Fact] - public void AreComObjectsAvailableForCleanup_NothingToCleanup_ReturnsFalse() - { - Assert.False(Marshal.AreComObjectsAvailableForCleanup()); - } - } -} diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CleanupUnusedObjectsInCurrentContextTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CleanupUnusedObjectsInCurrentContextTests.cs deleted file mode 100644 index c572e24..0000000 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CleanupUnusedObjectsInCurrentContextTests.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Xunit; - -namespace System.Runtime.InteropServices.Tests -{ - public class CleanupUnusedObjectsInCurrentContextTests - { - [Fact] - public void CleanupUnusedObjectsInCurrentContext_InvokeSeveralTimes_Success() - { - Marshal.CleanupUnusedObjectsInCurrentContext(); - Assert.False(Marshal.AreComObjectsAvailableForCleanup()); - - // Invoke twice to make sure things work when unused objects have already been - // cleaned up and there is nothing to do. - Marshal.CleanupUnusedObjectsInCurrentContext(); - Assert.False(Marshal.AreComObjectsAvailableForCleanup()); - } - } -} diff --git a/src/libraries/System.Threading.Thread/tests/ThreadTests.cs b/src/libraries/System.Threading.Thread/tests/ThreadTests.cs index 8c35d1c..6e35f06 100644 --- a/src/libraries/System.Threading.Thread/tests/ThreadTests.cs +++ b/src/libraries/System.Threading.Thread/tests/ThreadTests.cs @@ -1090,13 +1090,6 @@ namespace System.Threading.Threads.Tests Thread.BeginThreadAffinity(); Thread.EndThreadAffinity(); - ThreadTestHelpers.RunTestInBackgroundThread(() => - { - // TODO: Port tests for these once all of the necessary interop APIs are available - Thread.CurrentThread.DisableComObjectEagerCleanup(); - Marshal.CleanupUnusedObjectsInCurrentContext(); - }); - #pragma warning disable 618 // obsolete members Assert.Throws(() => Thread.CurrentThread.GetCompressedStack()); Assert.Throws(() => Thread.CurrentThread.SetCompressedStack(CompressedStack.Capture()));