diff options
author | Thays Grazia <thaystg@gmail.com> | 2019-10-21 17:20:12 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-10-21 17:20:12 +0300 |
commit | 0d357c13478d40b1a5e3646e7e03e869ee0a63bf (patch) | |
tree | 5864da1731e45da65758302e1b4b6dcaaab11ff3 /mcs/class/System.Net.Http | |
parent | f07e93da2f2a5fff3c5d1f050d4e60ebe90f2381 (diff) |
[tests] Replace __WATCHOS__ with MONOTOUCH_WATCH (#17459)
Fixes the conditional from mono/mono#17423, we don't define __WATCHOS__ in the Mono BCL builds. We use MONOTOUCH_WATCH instead.
Diffstat (limited to 'mcs/class/System.Net.Http')
5 files changed, 11 insertions, 11 deletions
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs index 9a4e255094d..915b076065c 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs @@ -120,11 +120,11 @@ namespace MonoTests.System.Net.Http.Headers headers.TryAddWithoutValidation("User-Agent", "agent2/2.0"); Assert.AreEqual (1, headers.UserAgent.Count, "#1"); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH if (HttpClientTestHelpers.UsingSocketsHandler) #endif Assert.AreEqual ("agent2/2.0 user,agent/1.0", headers.UserAgent.ToString (), "#2"); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH else Assert.AreEqual ("agent2/2.0user,agent/1.0", headers.UserAgent.ToString (), "#2"); #endif diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs index 5bb8d86b728..93ef2c81bd5 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs @@ -61,7 +61,7 @@ namespace MonoTests.System.Net.Http.Headers if (HttpClientTestHelpers.UsingSocketsHandler) Assert.Fail ("#1"); } catch (FormatException) { -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH if (!HttpClientTestHelpers.UsingSocketsHandler) throw; #endif diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs index 441730d1dcd..72c7d4550e7 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs @@ -189,7 +189,7 @@ namespace MonoTests.System.Net.Http [Test] #if FEATURE_NO_BSD_SOCKETS -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH [ExpectedException (typeof (PlatformNotSupportedException))] #endif #endif @@ -1111,7 +1111,7 @@ namespace MonoTests.System.Net.Http [Test] #if FEATURE_NO_BSD_SOCKETS -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH [ExpectedException (typeof (PlatformNotSupportedException))] #endif #endif diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs index 2eb17563a0e..3daf5b02bda 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs @@ -61,12 +61,12 @@ namespace MonoTests.System.Net.Http Assert.AreEqual (HttpMethod.Get, m.Method, "#3"); Assert.IsNotNull (m.Properties, "#4"); Assert.IsNull (m.RequestUri, "#5"); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH if (HttpClientTestHelpers.UsingSocketsHandler) { #endif Assert.AreEqual (new Version (2, 0), m.Version, "#6"); Assert.AreEqual ("Method: GET, RequestUri: '<null>', Version: 2.0, Content: <null>, Headers:\r\n{\r\n}", m.ToString (), "#7"); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH } else { Assert.AreEqual (new Version (1, 1), m.Version, "#6"); Assert.AreEqual ("Method: GET, RequestUri: '<null>', Version: 1.1, Content: <null>, Headers:\r\n{\r\n}", m.ToString (), "#7"); @@ -674,11 +674,11 @@ namespace MonoTests.System.Net.Http // .NET encloses the "Age: vv" with two whitespaces. var normalized = Regex.Replace (message.ToString (), @"\s", ""); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH if (HttpClientTestHelpers.UsingSocketsHandler) #endif Assert.AreEqual ("Method:GET,RequestUri:'<null>',Version:2.0,Content:<null>,Headers:{Age:vv}", normalized, "#3"); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH else Assert.AreEqual ("Method:GET,RequestUri:'<null>',Version:1.1,Content:<null>,Headers:{Age:vv}", normalized, "#3"); #endif diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs index df2a781bdc1..9e515152413 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs @@ -275,11 +275,11 @@ namespace MonoTests.System.Net.Http Assert.AreEqual ("v1", values[0]); break; case 1: -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH if (HttpClientTestHelpers.UsingSocketsHandler) #endif Assert.AreEqual ("Cache-Control", entry.Key); -#if !__WATCHOS__ +#if !MONOTOUCH_WATCH else Assert.AreEqual ("cache-control", entry.Key); #endif |