diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 90a18f86ca84ea..4e6ceb20b1955e 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -17,15 +17,9 @@ x86_64 x86 - - - - - - - - - - - - - diff --git a/eng/testing/tests.props b/eng/testing/tests.props index 382ffe67684d96..50ff37c891a4fd 100644 --- a/eng/testing/tests.props +++ b/eng/testing/tests.props @@ -23,9 +23,7 @@ $(NetCoreAppCurrent)-$(MonoConfiguration) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', '$(MobileHelpersDirSuffix)')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleTestRunner', '$(MobileHelpersDirSuffix)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', '$(MobileHelpersDirSuffix)')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidTestRunner', '$(MobileHelpersDirSuffix)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', '$(MobileHelpersDirSuffix)')) $(PackageRID) diff --git a/src/mono/msbuild/AndroidTestRunner/AndroidTestRunner.cs b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs similarity index 93% rename from src/mono/msbuild/AndroidTestRunner/AndroidTestRunner.cs rename to src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs index 8500bebd069d9e..9f232f549ba926 100644 --- a/src/mono/msbuild/AndroidTestRunner/AndroidTestRunner.cs +++ b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs @@ -1,3 +1,7 @@ +// 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 System; using System.Linq; using System.Text; diff --git a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj new file mode 100644 index 00000000000000..24fde08ba8a651 --- /dev/null +++ b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj @@ -0,0 +1,13 @@ + + + Exe + enable + $(NetCoreAppCurrent);$(NetFrameworkCurrent) + + + + + + + diff --git a/src/mono/msbuild/AppleTestRunner/AppleTestRunner.cs b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs similarity index 95% rename from src/mono/msbuild/AppleTestRunner/AppleTestRunner.cs rename to src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs index 9fa35b6cc15fa1..22979b7d4cf370 100644 --- a/src/mono/msbuild/AppleTestRunner/AppleTestRunner.cs +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs @@ -1,3 +1,7 @@ +// 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 System; using System.Linq; using System.Text; diff --git a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj new file mode 100644 index 00000000000000..078bf94a1172a5 --- /dev/null +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj @@ -0,0 +1,13 @@ + + + Exe + enable + $(NetCoreAppCurrent);$(NetFrameworkCurrent) + + + + + + + diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index c82088bcb6e982..67d25c68cd05b0 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -323,6 +323,9 @@ + + + diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj index 95118ff34a34c3..e9dd22e302f7ac 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj @@ -70,7 +70,7 @@ - + diff --git a/src/libraries/System.Runtime/tests/System/ArgumentExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ArgumentExceptionTests.cs index c0832946be83e2..d93235c1299299 100644 --- a/src/libraries/System.Runtime/tests/System/ArgumentExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArgumentExceptionTests.cs @@ -14,7 +14,7 @@ public static class ArgumentExceptionTests public static void Ctor_Empty() { var exception = new ArgumentException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, validateMessage: false); Assert.Null(exception.ParamName); } @@ -23,7 +23,7 @@ public static void Ctor_String() { string message = "the argument is wrong"; var exception = new ArgumentException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, message: message); Assert.Null(exception.ParamName); } @@ -33,7 +33,7 @@ public static void Ctor_String_Exception() string message = "the argument is wrong"; var innerException = new Exception("Inner exception"); var exception = new ArgumentException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, innerException: innerException, message: message); Assert.Null(exception.ParamName); } @@ -43,7 +43,7 @@ public static void Ctor_String_String() string message = "the argument is wrong"; string argumentName = "theArgument"; var exception = new ArgumentException(message, argumentName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, validateMessage: false); Assert.Equal(argumentName, exception.ParamName); Assert.Contains(message, exception.Message); Assert.Contains(argumentName, exception.Message); @@ -56,7 +56,7 @@ public static void Ctor_String_String_Exception() string argumentName = "theArgument"; var innerException = new Exception("Inner exception"); var exception = new ArgumentException(message, argumentName, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, innerException: innerException, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENT, innerException: innerException, validateMessage: false); Assert.Equal(argumentName, exception.ParamName); Assert.Contains(message, exception.Message); Assert.Contains(argumentName, exception.Message); diff --git a/src/libraries/System.Runtime/tests/System/ArgumentNullExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ArgumentNullExceptionTests.cs index f872b36d441dc3..91520e0a93669f 100644 --- a/src/libraries/System.Runtime/tests/System/ArgumentNullExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArgumentNullExceptionTests.cs @@ -14,7 +14,7 @@ public static class ArgumentNullExceptionTests public static void Ctor_Empty() { var exception = new ArgumentNullException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_POINTER, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_POINTER, validateMessage: false); Assert.Null(exception.ParamName); } @@ -23,7 +23,7 @@ public static void Ctor_String() { string argumentName = "theNullArgument"; var exception = new ArgumentNullException(argumentName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_POINTER, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_POINTER, validateMessage: false); Assert.Contains(argumentName, exception.Message); } @@ -33,7 +33,7 @@ public static void Ctor_String_Exception() string message = "the argument is null"; var innerException = new Exception("Inner exception"); var exception = new ArgumentNullException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_POINTER, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_POINTER, innerException: innerException, message: message); Assert.Null(exception.ParamName); } @@ -43,7 +43,7 @@ public static void Ctor_String_String() string message = "the argument is null"; string argumentName = "theNullArgument"; var exception = new ArgumentNullException(argumentName, message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_POINTER, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_POINTER, validateMessage: false); Assert.Equal(argumentName, exception.ParamName); Assert.Contains(message, exception.Message); Assert.Contains(argumentName, exception.Message); diff --git a/src/libraries/System.Runtime/tests/System/ArgumentOutOfRangeExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ArgumentOutOfRangeExceptionTests.cs index d3785552eb3908..ba14619ae82f12 100644 --- a/src/libraries/System.Runtime/tests/System/ArgumentOutOfRangeExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArgumentOutOfRangeExceptionTests.cs @@ -14,7 +14,7 @@ public static class ArgumentOutOfRangeExceptionTests public static void Ctor_Empty() { var exception = new ArgumentOutOfRangeException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); Assert.Null(exception.ParamName); Assert.Null(exception.ActualValue); } @@ -24,7 +24,7 @@ public static void Ctor_String() { string argumentName = "theArgument"; var exception = new ArgumentOutOfRangeException(argumentName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); Assert.Equal(argumentName, exception.ParamName); Assert.Null(exception.ActualValue); } @@ -35,7 +35,7 @@ public static void Ctor_String_Exception() string message = "the argument is out of range"; var innerException = new Exception("Inner exception"); var exception = new ArgumentOutOfRangeException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, innerException: innerException, message: message); Assert.Null(exception.ParamName); Assert.Null(exception.ActualValue); } @@ -46,7 +46,7 @@ public static void Ctor_String_String() string message = "the argument is out of range"; string argumentName = "theArgument"; var exception = new ArgumentOutOfRangeException(argumentName, message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); Assert.Equal(argumentName, exception.ParamName); Assert.Null(exception.ActualValue); Assert.Contains(message, exception.Message); @@ -60,7 +60,7 @@ public static void Ctor_String_Object_String() string argumentName = "theArgument"; int argumentValue = Int32.MaxValue; var exception = new ArgumentOutOfRangeException(argumentName, argumentValue, message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARGUMENTOUTOFRANGE, validateMessage: false); Assert.Equal(argumentName, exception.ParamName); Assert.Contains(message, exception.Message); Assert.Contains(argumentName, exception.Message); diff --git a/src/libraries/System.Runtime/tests/System/ArithmeticExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ArithmeticExceptionTests.cs index bd1ede2f2656e5..7a8eb22dc97bb7 100644 --- a/src/libraries/System.Runtime/tests/System/ArithmeticExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArithmeticExceptionTests.cs @@ -14,7 +14,7 @@ public static class ArithmeticExceptionTests public static void Ctor_Empty() { var exception = new ArithmeticException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARITHMETIC, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARITHMETIC, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "arithmetic operation error"; var exception = new ArithmeticException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARITHMETIC, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARITHMETIC, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "arithmetic operation error"; var innerException = new Exception("Inner exception"); var exception = new ArithmeticException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARITHMETIC, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARITHMETIC, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/ArrayTypeMismatchExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ArrayTypeMismatchExceptionTests.cs index d017250e387118..d59b91470d3ade 100644 --- a/src/libraries/System.Runtime/tests/System/ArrayTypeMismatchExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArrayTypeMismatchExceptionTests.cs @@ -14,7 +14,7 @@ public static class ArrayTypeMismatchExceptionTests public static void Ctor_Empty() { var exception = new ArrayTypeMismatchException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARRAYTYPEMISMATCH, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARRAYTYPEMISMATCH, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "array type mismatch"; var exception = new ArrayTypeMismatchException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARRAYTYPEMISMATCH, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARRAYTYPEMISMATCH, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "array type mismatch"; var innerException = new Exception("Inner exception"); var exception = new ArrayTypeMismatchException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_ARRAYTYPEMISMATCH, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_ARRAYTYPEMISMATCH, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/BadImageFormatExceptionTests.cs b/src/libraries/System.Runtime/tests/System/BadImageFormatExceptionTests.cs index 497f515f6e1cb9..70be2d06778994 100644 --- a/src/libraries/System.Runtime/tests/System/BadImageFormatExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/BadImageFormatExceptionTests.cs @@ -14,7 +14,7 @@ public static class BadImageFormatExceptionTests public static void Ctor_Empty() { var exception = new BadImageFormatException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, validateMessage: false); Assert.Null(exception.FileName); } @@ -23,7 +23,7 @@ public static void Ctor_String() { string message = "this is not the file you're looking for"; var exception = new BadImageFormatException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, message: message); Assert.Null(exception.FileName); } @@ -33,7 +33,7 @@ public static void Ctor_String_Exception() string message = "this is not the file you're looking for"; var innerException = new Exception("Inner exception"); var exception = new BadImageFormatException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, innerException: innerException, message: message); Assert.Null(exception.FileName); } @@ -43,7 +43,7 @@ public static void Ctor_String_String() string message = "this is not the file you're looking for"; string fileName = "file.txt"; var exception = new BadImageFormatException(message, fileName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, message: message); Assert.Equal(fileName, exception.FileName); } @@ -54,7 +54,7 @@ public static void Ctor_String_String_Exception() string fileName = "file.txt"; var innerException = new Exception("Inner exception"); var exception = new BadImageFormatException(message, fileName, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_BADIMAGEFORMAT, innerException: innerException, message: message); Assert.Equal(fileName, exception.FileName); } diff --git a/src/libraries/System.Runtime/tests/System/Collections/Generic/KeyNotFoundExceptionTests.cs b/src/libraries/System.Runtime/tests/System/Collections/Generic/KeyNotFoundExceptionTests.cs index c3cf6a6c4e491b..e3013ab165a33b 100644 --- a/src/libraries/System.Runtime/tests/System/Collections/Generic/KeyNotFoundExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/Collections/Generic/KeyNotFoundExceptionTests.cs @@ -16,7 +16,7 @@ public static class KeyNotFoundExceptionTests public static void Ctor_Empty() { var exception = new KeyNotFoundException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_KEYNOTFOUND, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_KEYNOTFOUND, validateMessage: false); } [Fact] @@ -24,7 +24,7 @@ public static void Ctor_String() { string message = "this is not the key you're looking for"; var exception = new KeyNotFoundException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_KEYNOTFOUND, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_KEYNOTFOUND, message: message); } [Fact] @@ -33,7 +33,7 @@ public static void Ctor_String_Exception() string message = "this is not the key you're looking for"; var innerException = new Exception("Inner exception"); var exception = new KeyNotFoundException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_KEYNOTFOUND, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_KEYNOTFOUND, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/DivideByZeroExceptionTests.cs b/src/libraries/System.Runtime/tests/System/DivideByZeroExceptionTests.cs index 0e86ae49b4b86a..a9117b70833387 100644 --- a/src/libraries/System.Runtime/tests/System/DivideByZeroExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/DivideByZeroExceptionTests.cs @@ -14,7 +14,7 @@ public static class DivideByZeroExceptionTests public static void Ctor_Empty() { var exception = new DivideByZeroException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_DIVIDEBYZERO, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_DIVIDEBYZERO, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "divide by zero"; var exception = new DivideByZeroException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_DIVIDEBYZERO, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_DIVIDEBYZERO, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "divide by zero"; var innerException = new Exception("Inner exception"); var exception = new DivideByZeroException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_DIVIDEBYZERO, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_DIVIDEBYZERO, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/Exceptions.Utility.cs b/src/libraries/System.Runtime/tests/System/Exception.Helpers.cs similarity index 96% rename from src/libraries/System.Runtime/tests/System/Exceptions.Utility.cs rename to src/libraries/System.Runtime/tests/System/Exception.Helpers.cs index d7d0967c94dcae..a39cd049988284 100644 --- a/src/libraries/System.Runtime/tests/System/Exceptions.Utility.cs +++ b/src/libraries/System.Runtime/tests/System/Exception.Helpers.cs @@ -7,7 +7,7 @@ namespace System.Tests { - public static class ExceptionUtility + public static class ExceptionHelpers { public static void ValidateExceptionProperties(Exception e, int hResult, diff --git a/src/libraries/System.Runtime/tests/System/ExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ExceptionTests.cs index 6d663486205a3d..4704368e6b9a51 100644 --- a/src/libraries/System.Runtime/tests/System/ExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ExceptionTests.cs @@ -21,7 +21,7 @@ public static class ExceptionTests public static void Ctor_Empty() { var exception = new Exception(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_EXCEPTION, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_EXCEPTION, validateMessage: false); } [Fact] @@ -29,7 +29,7 @@ public static void Ctor_String() { string message = "something went wrong"; var exception = new Exception(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_EXCEPTION, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_EXCEPTION, message: message); } [Fact] @@ -38,7 +38,7 @@ public static void Ctor_String_Exception() string message = "something went wrong"; var innerException = new Exception("Inner exception"); var exception = new Exception(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_EXCEPTION, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_EXCEPTION, innerException: innerException, message: message); } [Fact] diff --git a/src/libraries/System.Runtime/tests/System/FormatExceptionTests.cs b/src/libraries/System.Runtime/tests/System/FormatExceptionTests.cs index 79924d6b53b5b5..a5f78ae97a36e2 100644 --- a/src/libraries/System.Runtime/tests/System/FormatExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/FormatExceptionTests.cs @@ -14,7 +14,7 @@ public static class FormatExceptionTests public static void Ctor_Empty() { var exception = new FormatException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_FORMAT, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_FORMAT, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "bad format"; var exception = new FormatException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_FORMAT, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_FORMAT, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "bad format"; var innerException = new Exception("Inner exception"); var exception = new FormatException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_FORMAT, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_FORMAT, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundException.InteropTests.cs b/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundException.InteropTests.cs index 37c4c89c4ba93b..5a1a533ba07023 100644 --- a/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundException.InteropTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundException.InteropTests.cs @@ -19,7 +19,7 @@ public static void From_HR(int hr) DirectoryNotFoundException exception = Assert.IsAssignableFrom(Marshal.GetExceptionForHR(hr, new IntPtr(-1))); // Don't validate the message. Currently .NET Native does not produce HR-specific messages - ExceptionUtility.ValidateExceptionProperties(exception, hResult: hr, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: hr, validateMessage: false); } } } diff --git a/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundExceptionTests.cs b/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundExceptionTests.cs index 229acd4b0d2d4c..f510afd9d1ca01 100644 --- a/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/DirectoryNotFoundExceptionTests.cs @@ -15,7 +15,7 @@ public static class DirectoryNotFoundExceptionTests public static void Ctor_Empty() { var exception = new DirectoryNotFoundException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_DIRECTORYNOTFOUND, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_DIRECTORYNOTFOUND, validateMessage: false); } [Fact] @@ -23,7 +23,7 @@ public static void Ctor_String() { string message = "That page was missing from the directory."; var exception = new DirectoryNotFoundException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_DIRECTORYNOTFOUND, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_DIRECTORYNOTFOUND, message: message); } [Fact] @@ -32,7 +32,7 @@ public static void Ctor_String_Exception() string message = "That page was missing from the directory."; var innerException = new Exception("Inner exception"); var exception = new DirectoryNotFoundException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_DIRECTORYNOTFOUND, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_DIRECTORYNOTFOUND, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/IO/FileLoadException.InteropTests.cs b/src/libraries/System.Runtime/tests/System/IO/FileLoadException.InteropTests.cs index 6cb7e62e7542dc..4072851e06706e 100644 --- a/src/libraries/System.Runtime/tests/System/IO/FileLoadException.InteropTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/FileLoadException.InteropTests.cs @@ -44,7 +44,7 @@ public static void Fom_HR(int hr) Assert.NotNull(fileLoadException); // Don't validate the message. Currently .NET Native does not produce HR-specific messages - ExceptionUtility.ValidateExceptionProperties(fileLoadException, hResult: hr, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(fileLoadException, hResult: hr, validateMessage: false); Assert.Null(fileLoadException.FileName); } } diff --git a/src/libraries/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs b/src/libraries/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs index 9d4549742e8a14..b7479e868daddd 100644 --- a/src/libraries/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs @@ -13,7 +13,7 @@ public static class FileLoadExceptionTests public static void Ctor_Empty() { var exception = new FileLoadException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, validateMessage: false); Assert.Null(exception.FileName); } @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "this is not the file you're looking for"; var exception = new FileLoadException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, message: message); Assert.Null(exception.FileName); } @@ -32,7 +32,7 @@ public static void Ctor_String_Exception() string message = "this is not the file you're looking for"; var innerException = new Exception("Inner exception"); var exception = new FileLoadException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, innerException: innerException, message: message); Assert.Null(exception.FileName); } @@ -42,7 +42,7 @@ public static void Ctor_String_String() string message = "this is not the file you're looking for"; string fileName = "file.txt"; var exception = new FileLoadException(message, fileName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, message: message); Assert.Equal(fileName, exception.FileName); } @@ -53,7 +53,7 @@ public static void Ctor_String_String_Exception() string fileName = "file.txt"; var innerException = new Exception("Inner exception"); var exception = new FileLoadException(message, fileName, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILELOAD, innerException: innerException, message: message); Assert.Equal(fileName, exception.FileName); } diff --git a/src/libraries/System.Runtime/tests/System/IO/FileNotFoundException.InteropTests.cs b/src/libraries/System.Runtime/tests/System/IO/FileNotFoundException.InteropTests.cs index bd6887359f06a1..5ccc505f93a163 100644 --- a/src/libraries/System.Runtime/tests/System/IO/FileNotFoundException.InteropTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/FileNotFoundException.InteropTests.cs @@ -18,7 +18,7 @@ public static void From_HR(int hr) FileNotFoundException exception = Assert.IsAssignableFrom(Marshal.GetExceptionForHR(hr, new IntPtr(-1))); // Don't validate the message. Currently .NET Native does not produce HR-specific messages - ExceptionUtility.ValidateExceptionProperties(exception, hResult: hr, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: hr, validateMessage: false); } } } diff --git a/src/libraries/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs b/src/libraries/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs index c9e8ae9368f9c8..73f39702f1655f 100644 --- a/src/libraries/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs @@ -13,7 +13,7 @@ public static class FileNotFoundExceptionTests public static void Ctor_Empty() { var exception = new FileNotFoundException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, validateMessage: false); Assert.Null(exception.FileName); } @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "this is not the file you're looking for"; var exception = new FileNotFoundException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, message: message); Assert.Null(exception.FileName); } @@ -32,7 +32,7 @@ public static void Ctor_String_Exception() string message = "this is not the file you're looking for"; var innerException = new Exception("Inner exception"); var exception = new FileNotFoundException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, innerException: innerException, message: message); Assert.Null(exception.FileName); } @@ -42,7 +42,7 @@ public static void Ctor_String_String() string message = "this is not the file you're looking for"; string fileName = "file.txt"; var exception = new FileNotFoundException(message, fileName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, message: message); Assert.Equal(fileName, exception.FileName); } @@ -53,7 +53,7 @@ public static void Ctor_String_String_Exception() string fileName = "file.txt"; var innerException = new Exception("Inner exception"); var exception = new FileNotFoundException(message, fileName, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_FILENOTFOUND, innerException: innerException, message: message); Assert.Equal(fileName, exception.FileName); } diff --git a/src/libraries/System.Runtime/tests/System/IO/IOExceptionTests.cs b/src/libraries/System.Runtime/tests/System/IO/IOExceptionTests.cs index ab5258c2668579..14b769eb1f3601 100644 --- a/src/libraries/System.Runtime/tests/System/IO/IOExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/IOExceptionTests.cs @@ -16,7 +16,7 @@ public static class IOExceptionTests public static void Ctor_Empty() { var exception = new IOException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_IO, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_IO, validateMessage: false); } [Fact] @@ -24,7 +24,7 @@ public static void Ctor_String() { string message = "IO failure"; var exception = new IOException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_IO, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_IO, message: message); } [Fact] @@ -33,7 +33,7 @@ public static void Ctor_String_Exception() string message = "IO failure"; var innerException = new Exception("Inner exception"); var exception = new IOException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_IO, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_IO, innerException: innerException, message: message); } [Fact] @@ -42,7 +42,7 @@ public static void Ctor_String_Int32() string message = "IO failure"; int hResult = unchecked((int)0x80424242); var exception = new IOException(message, hResult); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: hResult, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: hResult, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/IO/PathTooLongException.InteropTests.cs b/src/libraries/System.Runtime/tests/System/IO/PathTooLongException.InteropTests.cs index 1a21cad4a34edd..11c93f5fcf54de 100644 --- a/src/libraries/System.Runtime/tests/System/IO/PathTooLongException.InteropTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/PathTooLongException.InteropTests.cs @@ -15,7 +15,7 @@ public static void From_HR() { int hr = HResults.COR_E_PATHTOOLONG; PathTooLongException exception = Assert.IsAssignableFrom(Marshal.GetExceptionForHR(hr, new IntPtr(-1))); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: hr, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: hr, validateMessage: false); } } } diff --git a/src/libraries/System.Runtime/tests/System/IO/PathTooLongExceptionTests.cs b/src/libraries/System.Runtime/tests/System/IO/PathTooLongExceptionTests.cs index 8bf3dd2ab5f1f8..5d05b283cbedb5 100644 --- a/src/libraries/System.Runtime/tests/System/IO/PathTooLongExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/IO/PathTooLongExceptionTests.cs @@ -16,7 +16,7 @@ public static class PathTooLongExceptionTests public static void Ctor_Empty() { var exception = new PathTooLongException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_PATHTOOLONG, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_PATHTOOLONG, validateMessage: false); } [Fact] @@ -24,7 +24,7 @@ public static void Ctor_String() { string message = "This path is too long to hike in a single day."; var exception = new PathTooLongException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_PATHTOOLONG, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_PATHTOOLONG, message: message); } [Fact] @@ -33,7 +33,7 @@ public static void Ctor_String_Exception() string message = "This path is too long to hike in a single day."; var innerException = new Exception("Inner exception"); var exception = new PathTooLongException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: HResults.COR_E_PATHTOOLONG, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: HResults.COR_E_PATHTOOLONG, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/IndexOutOfRangeExceptionTests.cs b/src/libraries/System.Runtime/tests/System/IndexOutOfRangeExceptionTests.cs index 69d83851efcdaf..98314f591f5010 100644 --- a/src/libraries/System.Runtime/tests/System/IndexOutOfRangeExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/IndexOutOfRangeExceptionTests.cs @@ -14,7 +14,7 @@ public static class IndexOutOfRangeExceptionTests public static void Ctor_Empty() { var exception = new IndexOutOfRangeException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INDEXOUTOFRANGE, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INDEXOUTOFRANGE, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "out of range"; var exception = new IndexOutOfRangeException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INDEXOUTOFRANGE, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INDEXOUTOFRANGE, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "out of range"; var innerException = new Exception("Inner exception"); var exception = new IndexOutOfRangeException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INDEXOUTOFRANGE, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INDEXOUTOFRANGE, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/InvalidCastExceptionTests.cs b/src/libraries/System.Runtime/tests/System/InvalidCastExceptionTests.cs index ac0bb5ae408f6d..291d5137a7e2be 100644 --- a/src/libraries/System.Runtime/tests/System/InvalidCastExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/InvalidCastExceptionTests.cs @@ -14,7 +14,7 @@ public static class InvalidCastExceptionTests public static void Ctor_Empty() { var exception = new InvalidCastException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDCAST, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDCAST, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "wrong type"; var exception = new InvalidCastException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDCAST, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDCAST, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "wrong type"; var innerException = new Exception("Inner exception"); var exception = new InvalidCastException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDCAST, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDCAST, innerException: innerException, message: message); } [Fact] @@ -40,7 +40,7 @@ public static void Ctor_String_Int32() string message = "wrong type"; int errorCode = unchecked((int)0x80424242); var exception = new InvalidCastException(message, errorCode); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: errorCode, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: errorCode, message: message); } } diff --git a/src/libraries/System.Runtime/tests/System/InvalidOperationExceptionTests.cs b/src/libraries/System.Runtime/tests/System/InvalidOperationExceptionTests.cs index d1a877aca25167..7448b5bb8e25e5 100644 --- a/src/libraries/System.Runtime/tests/System/InvalidOperationExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/InvalidOperationExceptionTests.cs @@ -14,7 +14,7 @@ public static class InvalidOperationExceptionTests public static void Ctor_Empty() { var exception = new InvalidOperationException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDOPERATION, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDOPERATION, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "invalid operation"; var exception = new InvalidOperationException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDOPERATION, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDOPERATION, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "invalid operation"; var innerException = new Exception("Inner exception"); var exception = new InvalidOperationException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDOPERATION, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDOPERATION, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/InvalidProgramExceptionTests.cs b/src/libraries/System.Runtime/tests/System/InvalidProgramExceptionTests.cs index 17488ceb1e40ef..98ae359537af28 100644 --- a/src/libraries/System.Runtime/tests/System/InvalidProgramExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/InvalidProgramExceptionTests.cs @@ -14,7 +14,7 @@ public static class InvalidProgramExceptionTests public static void Ctor_Empty() { var exception = new InvalidProgramException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDPROGRAM, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDPROGRAM, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "bad program"; var exception = new InvalidProgramException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDPROGRAM, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDPROGRAM, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "bad program"; var innerException = new Exception("Inner exception"); var exception = new InvalidProgramException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDPROGRAM, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_INVALIDPROGRAM, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/MemberAccessExceptionTests.cs b/src/libraries/System.Runtime/tests/System/MemberAccessExceptionTests.cs index 6ffc2912009f69..46b268ff311e4f 100644 --- a/src/libraries/System.Runtime/tests/System/MemberAccessExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/MemberAccessExceptionTests.cs @@ -14,7 +14,7 @@ public static class MemberAccessExceptionTests public static void Ctor_Empty() { var exception = new MemberAccessException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_MEMBERACCESS, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_MEMBERACCESS, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "you cannot access this member"; var exception = new MemberAccessException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_MEMBERACCESS, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_MEMBERACCESS, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "you cannot access this member"; var innerException = new Exception("Inner exception"); var exception = new MemberAccessException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_MEMBERACCESS, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_MEMBERACCESS, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/NotImplementedExceptionTests.cs b/src/libraries/System.Runtime/tests/System/NotImplementedExceptionTests.cs index f2a19dddafedfe..dfc8ab299a9f0a 100644 --- a/src/libraries/System.Runtime/tests/System/NotImplementedExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/NotImplementedExceptionTests.cs @@ -14,7 +14,7 @@ public static class NotImplementedExceptionTests public static void Ctor_Empty() { var exception = new NotImplementedException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_NOTIMPL, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_NOTIMPL, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "not implemented"; var exception = new NotImplementedException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_NOTIMPL, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_NOTIMPL, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "not implemented"; var innerException = new Exception("Inner exception"); var exception = new NotImplementedException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: E_NOTIMPL, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: E_NOTIMPL, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/NotSupportedExceptionTests.cs b/src/libraries/System.Runtime/tests/System/NotSupportedExceptionTests.cs index a5aa0905d74b0d..6aa28beffbd871 100644 --- a/src/libraries/System.Runtime/tests/System/NotSupportedExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/NotSupportedExceptionTests.cs @@ -14,7 +14,7 @@ public static class NotSupportedExceptionTests public static void Ctor_Empty() { var exception = new NotSupportedException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_NOTSUPPORTED, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_NOTSUPPORTED, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "not supported"; var exception = new NotSupportedException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_NOTSUPPORTED, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_NOTSUPPORTED, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "not supported"; var innerException = new Exception("Inner exception"); var exception = new NotSupportedException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_NOTSUPPORTED, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_NOTSUPPORTED, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/ObjectDisposedExceptionTests.cs b/src/libraries/System.Runtime/tests/System/ObjectDisposedExceptionTests.cs index 8345a782fe7bc2..4334b9f29c690c 100644 --- a/src/libraries/System.Runtime/tests/System/ObjectDisposedExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/ObjectDisposedExceptionTests.cs @@ -15,7 +15,7 @@ public static void Ctor_String() { string objectName = "theObject"; var exception = new ObjectDisposedException(objectName); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OBJECTDISPOSED, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OBJECTDISPOSED, validateMessage: false); Assert.Contains(objectName, exception.Message); var exceptionNullObjectName = new ObjectDisposedException(null); @@ -28,7 +28,7 @@ public static void Ctor_String_Exception() string message = "object disposed"; var innerException = new Exception("Inner exception"); var exception = new ObjectDisposedException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OBJECTDISPOSED, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OBJECTDISPOSED, innerException: innerException, message: message); Assert.Equal("", exception.ObjectName); } @@ -38,7 +38,7 @@ public static void Ctor_String_String() string message = "object disposed"; string objectName = "theObject"; var exception = new ObjectDisposedException(objectName, message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OBJECTDISPOSED, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OBJECTDISPOSED, validateMessage: false); Assert.Equal(objectName, exception.ObjectName); Assert.Contains(message, exception.Message); Assert.Contains(objectName, exception.Message); diff --git a/src/libraries/System.Runtime/tests/System/OutOfMemoryExceptionTests.cs b/src/libraries/System.Runtime/tests/System/OutOfMemoryExceptionTests.cs index 39c3fd1e9b6a2b..7585bceb305283 100644 --- a/src/libraries/System.Runtime/tests/System/OutOfMemoryExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/OutOfMemoryExceptionTests.cs @@ -14,7 +14,7 @@ public static class OutOfMemoryExceptionTests public static void Ctor_Empty() { var exception = new OutOfMemoryException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OUTOFMEMORY, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OUTOFMEMORY, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "out of memory"; var exception = new OutOfMemoryException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OUTOFMEMORY, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OUTOFMEMORY, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "out of memory"; var innerException = new Exception("Inner exception"); var exception = new OutOfMemoryException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OUTOFMEMORY, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OUTOFMEMORY, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/OverflowExceptionTests.cs b/src/libraries/System.Runtime/tests/System/OverflowExceptionTests.cs index 2c239b180c6a30..348fc7b15aa99e 100644 --- a/src/libraries/System.Runtime/tests/System/OverflowExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/OverflowExceptionTests.cs @@ -14,7 +14,7 @@ public static class OverflowExceptionTests public static void Ctor_Empty() { var exception = new OverflowException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OVERFLOW, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OVERFLOW, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "overflow"; var exception = new OverflowException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OVERFLOW, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OVERFLOW, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "overflow"; var innerException = new Exception("Inner exception"); var exception = new OverflowException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_OVERFLOW, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_OVERFLOW, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/PlatformNotSupportedExceptionTests.cs b/src/libraries/System.Runtime/tests/System/PlatformNotSupportedExceptionTests.cs index 1e0fc9452e9690..0897004bd2ccec 100644 --- a/src/libraries/System.Runtime/tests/System/PlatformNotSupportedExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/PlatformNotSupportedExceptionTests.cs @@ -14,7 +14,7 @@ public static class PlatformNotSupportedExceptionTests public static void Ctor_Empty() { var exception = new PlatformNotSupportedException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_PLATFORMNOTSUPPORTED, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_PLATFORMNOTSUPPORTED, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "platform not supported"; var exception = new PlatformNotSupportedException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_PLATFORMNOTSUPPORTED, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_PLATFORMNOTSUPPORTED, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "platform not supported"; var innerException = new Exception("Inner exception"); var exception = new PlatformNotSupportedException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_PLATFORMNOTSUPPORTED, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_PLATFORMNOTSUPPORTED, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/RankExceptionTests.cs b/src/libraries/System.Runtime/tests/System/RankExceptionTests.cs index 6a3bad220dcddd..6da6e3f614f587 100644 --- a/src/libraries/System.Runtime/tests/System/RankExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/RankExceptionTests.cs @@ -14,7 +14,7 @@ public static class RankExceptionTests public static void Ctor_Empty() { var exception = new RankException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_RANK, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_RANK, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "bad rank"; var exception = new RankException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_RANK, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_RANK, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "bad rank"; var innerException = new Exception("Inner exception"); var exception = new RankException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_RANK, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_RANK, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/Security/SecurityExceptionTests.cs b/src/libraries/System.Runtime/tests/System/Security/SecurityExceptionTests.cs index 57596cb863b8bc..f6462cb5ca3323 100644 --- a/src/libraries/System.Runtime/tests/System/Security/SecurityExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/Security/SecurityExceptionTests.cs @@ -17,7 +17,7 @@ public static class SecurityExceptionTests public static void Ctor_Empty() { var exception = new SecurityException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, validateMessage: false); } [Fact] @@ -25,7 +25,7 @@ public static void Ctor_String() { string message = "security problem"; var exception = new SecurityException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, message: message); } [Fact] @@ -34,7 +34,7 @@ public static void Ctor_String_Exception() string message = "security problem"; var innerException = new Exception("Inner exception"); var exception = new SecurityException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, innerException: innerException, message: message); } [Fact] @@ -42,7 +42,7 @@ public static void Ctor_String_Type() { string message = "security problem"; var exception = new SecurityException(message, typeof(SecurityExceptionTests)); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, message: message); Assert.Equal(typeof(SecurityExceptionTests), exception.PermissionType); } @@ -51,7 +51,7 @@ public static void Ctor_String_Type_String() { string message = "security problem"; var exception = new SecurityException(message, typeof(SecurityExceptionTests), "permission state"); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_SECURITY, message: message); Assert.Equal(typeof(SecurityExceptionTests), exception.PermissionType); Assert.Equal("permission state", exception.PermissionState); } diff --git a/src/libraries/System.Runtime/tests/System/TimeoutExceptionTests.cs b/src/libraries/System.Runtime/tests/System/TimeoutExceptionTests.cs index 652fe1f0b238e6..3a4a9722441b88 100644 --- a/src/libraries/System.Runtime/tests/System/TimeoutExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/TimeoutExceptionTests.cs @@ -14,7 +14,7 @@ public static class TimeoutExceptionTests public static void Ctor_Empty() { var exception = new TimeoutException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_TIMEOUT, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_TIMEOUT, validateMessage: false); } [Fact] @@ -22,7 +22,7 @@ public static void Ctor_String() { string message = "timeout"; var exception = new TimeoutException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_TIMEOUT, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_TIMEOUT, message: message); } [Fact] @@ -31,7 +31,7 @@ public static void Ctor_String_Exception() string message = "timeout"; var innerException = new Exception("Inner exception"); var exception = new TimeoutException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_TIMEOUT, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_TIMEOUT, innerException: innerException, message: message); } } } diff --git a/src/libraries/System.Runtime/tests/System/TypeLoadExceptionTests.cs b/src/libraries/System.Runtime/tests/System/TypeLoadExceptionTests.cs index 2fe5e13fd7649c..31e80b39ef20e4 100644 --- a/src/libraries/System.Runtime/tests/System/TypeLoadExceptionTests.cs +++ b/src/libraries/System.Runtime/tests/System/TypeLoadExceptionTests.cs @@ -15,7 +15,7 @@ public static class TypeLoadExceptionTests public static void Ctor_Empty() { var exception = new TypeLoadException(); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_TYPELOAD, validateMessage: false); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_TYPELOAD, validateMessage: false); Assert.Equal("", exception.TypeName); } @@ -24,7 +24,7 @@ public static void Ctor_String() { string message = "type failed to load"; var exception = new TypeLoadException(message); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_TYPELOAD, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_TYPELOAD, message: message); Assert.Equal("", exception.TypeName); } @@ -34,7 +34,7 @@ public static void Ctor_String_Exception() string message = "type failed to load"; var innerException = new Exception("Inner exception"); var exception = new TypeLoadException(message, innerException); - ExceptionUtility.ValidateExceptionProperties(exception, hResult: COR_E_TYPELOAD, innerException: innerException, message: message); + ExceptionHelpers.ValidateExceptionProperties(exception, hResult: COR_E_TYPELOAD, innerException: innerException, message: message); Assert.Equal("", exception.TypeName); } } diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 834b513f5ec38b..e0224d5b0c30db 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -887,18 +887,12 @@ - - diff --git a/src/mono/msbuild/AndroidTestRunner/AndroidTestRunner.csproj b/src/mono/msbuild/AndroidTestRunner/AndroidTestRunner.csproj deleted file mode 100644 index 6ab597f0b08adc..00000000000000 --- a/src/mono/msbuild/AndroidTestRunner/AndroidTestRunner.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - Exe - - - - - diff --git a/src/mono/msbuild/AppleTestRunner/AppleTestRunner.csproj b/src/mono/msbuild/AppleTestRunner/AppleTestRunner.csproj deleted file mode 100644 index 6ab597f0b08adc..00000000000000 --- a/src/mono/msbuild/AppleTestRunner/AppleTestRunner.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - Exe - - - - -