diff options
author | Sepideh Khoshnood <sekho@microsoft.com> | 2017-02-09 02:53:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-09 02:53:46 +0300 |
commit | 6451bed4d4a667d9c05a41c0843504d020d283ab (patch) | |
tree | ce67f44e59291ab5be7fd6ff97f8fefd31f0c0aa /src/System.Threading | |
parent | 0738551debef08b7b2432e80ce5b4914c901b371 (diff) | |
parent | 81604bbc112e87a24a85d226ae678b3e911ff7af (diff) |
Merge pull request #15932 from sepidehMS/PlatformSpecificTests
Review all PlatformSpecific tests to ensure test coverage
Diffstat (limited to 'src/System.Threading')
-rw-r--r-- | src/System.Threading/tests/EventWaitHandleTests.cs | 16 | ||||
-rw-r--r-- | src/System.Threading/tests/MutexTests.cs | 4 | ||||
-rw-r--r-- | src/System.Threading/tests/SemaphoreTests.cs | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/System.Threading/tests/EventWaitHandleTests.cs b/src/System.Threading/tests/EventWaitHandleTests.cs index 8c7617caf8..d983099563 100644 --- a/src/System.Threading/tests/EventWaitHandleTests.cs +++ b/src/System.Threading/tests/EventWaitHandleTests.cs @@ -26,14 +26,14 @@ namespace System.Threading.Tests Assert.Throws<ArgumentException>(() => new EventWaitHandle(true, (EventResetMode)12345)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // names aren't supported on Unix [Fact] public void Ctor_InvalidNames() { Assert.Throws<ArgumentException>(() => new EventWaitHandle(true, EventResetMode.AutoReset, new string('a', 1000))); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // names aren't supported on Unix [Fact] public void Ctor_NamesArentSupported_Unix() { @@ -42,7 +42,7 @@ namespace System.Threading.Tests Assert.Throws<PlatformNotSupportedException>(() => new EventWaitHandle(false, EventResetMode.AutoReset, "anything", out createdNew)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // names aren't supported on Unix [Theory] [InlineData(false, EventResetMode.AutoReset)] [InlineData(false, EventResetMode.ManualReset)] @@ -100,7 +100,7 @@ namespace System.Threading.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_Windows() { @@ -131,7 +131,7 @@ namespace System.Threading.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_NotSupported_Unix() { @@ -140,7 +140,7 @@ namespace System.Threading.Tests Assert.Throws<PlatformNotSupportedException>(() => EventWaitHandle.TryOpenExisting("anything", out ewh)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_InvalidNames_Windows() { @@ -149,7 +149,7 @@ namespace System.Threading.Tests Assert.Throws<ArgumentException>(() => EventWaitHandle.OpenExisting(new string('a', 10000))); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_UnavailableName_Windows() { @@ -159,7 +159,7 @@ namespace System.Threading.Tests Assert.False(EventWaitHandle.TryOpenExisting(name, out ignored)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // OpenExisting not supported on Unix [Fact] public void OpenExisting_NameUsedByOtherSynchronizationPrimitive_Windows() { diff --git a/src/System.Threading/tests/MutexTests.cs b/src/System.Threading/tests/MutexTests.cs index cbd4a5c7dd..983c0ea956 100644 --- a/src/System.Threading/tests/MutexTests.cs +++ b/src/System.Threading/tests/MutexTests.cs @@ -58,7 +58,7 @@ namespace System.Threading.Tests } } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void Ctor_NameUsedByOtherSynchronizationPrimitive_Windows() { @@ -113,7 +113,7 @@ namespace System.Threading.Tests Assert.False(Mutex.TryOpenExisting(name, out ignored)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void OpenExisting_NameUsedByOtherSynchronizationPrimitive_Windows() { diff --git a/src/System.Threading/tests/SemaphoreTests.cs b/src/System.Threading/tests/SemaphoreTests.cs index ab1b0af668..8344b65458 100644 --- a/src/System.Threading/tests/SemaphoreTests.cs +++ b/src/System.Threading/tests/SemaphoreTests.cs @@ -24,7 +24,7 @@ namespace System.Threading.Tests new Semaphore(initialCount, maximumCount, null).Dispose(); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void Ctor_ValidName_Windows() { @@ -37,7 +37,7 @@ namespace System.Threading.Tests Assert.True(createdNew); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // named semaphores aren't supported on Unix [Fact] public void Ctor_NamesArentSupported_Unix() { @@ -73,7 +73,7 @@ namespace System.Threading.Tests Assert.Throws<ArgumentException>(() => new Semaphore(2, 1, "CtorSemaphoreTest", out createdNew)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void Ctor_InvalidNames() { @@ -196,7 +196,7 @@ namespace System.Threading.Tests }, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default)); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // named semaphores aren't supported on Unix [Fact] public void OpenExisting_NotSupported_Unix() { @@ -207,7 +207,7 @@ namespace System.Threading.Tests Assert.Throws<PlatformNotSupportedException>(() => Semaphore.TryOpenExisting("anything", out semaphore)); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // named semaphores aren't supported on Unix [Fact] public void OpenExisting_InvalidNames_Windows() { |