diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-10-23 19:22:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 19:22:39 +0300 |
commit | bd7692c6ab69079fdaa543a0964fc0c1ebb17284 (patch) | |
tree | 9e1c329560ba60323800c3bd88ecba40a553d0a4 /src/System.Private.Interop | |
parent | ae58977506b70800ca2c4ced423580047d89d302 (diff) |
Search/replace Debug.Assert(false, => Debug.Fail( (#4782)
Diffstat (limited to 'src/System.Private.Interop')
5 files changed, 10 insertions, 10 deletions
diff --git a/src/System.Private.Interop/src/InteropExtensions/DependencyReductionTypeRemoved.cs b/src/System.Private.Interop/src/InteropExtensions/DependencyReductionTypeRemoved.cs index 5af94f119..f6c2c7d0c 100644 --- a/src/System.Private.Interop/src/InteropExtensions/DependencyReductionTypeRemoved.cs +++ b/src/System.Private.Interop/src/InteropExtensions/DependencyReductionTypeRemoved.cs @@ -16,7 +16,7 @@ namespace System.Runtime.CompilerServices { public DependencyReductionTypeRemoved() { - Debug.Assert(false, "A type that was removed by dependency reduction has been instantiated."); + Debug.Fail("A type that was removed by dependency reduction has been instantiated."); throw new Exception("A type that was removed by dependency reduction has been instantiated."); } } diff --git a/src/System.Private.Interop/src/Shared/McgHelpers.cs b/src/System.Private.Interop/src/Shared/McgHelpers.cs index 370f4d409..d6d8caac6 100644 --- a/src/System.Private.Interop/src/Shared/McgHelpers.cs +++ b/src/System.Private.Interop/src/Shared/McgHelpers.cs @@ -151,7 +151,7 @@ namespace System.Runtime.InteropServices break; default: - Debug.Assert(false, "IListThunk wrong oper"); + Debug.Fail("IListThunk wrong oper"); break; } @@ -213,7 +213,7 @@ namespace System.Runtime.InteropServices break; default: - Debug.Assert(false, "IListBlittableThunk wrong oper"); + Debug.Fail("IListBlittableThunk wrong oper"); break; } @@ -269,7 +269,7 @@ namespace System.Runtime.InteropServices break; default: - Debug.Assert(false, "IReadOnlyListThunk wrong oper"); + Debug.Fail("IReadOnlyListThunk wrong oper"); break; } @@ -311,7 +311,7 @@ namespace System.Runtime.InteropServices break; default: - Debug.Assert(false, "IReadOnlyListThunk wrong oper"); + Debug.Fail("IReadOnlyListThunk wrong oper"); break; } diff --git a/src/System.Private.Interop/src/Shared/McgModule.cs b/src/System.Private.Interop/src/Shared/McgModule.cs index 66d604fca..63e097c2d 100644 --- a/src/System.Private.Interop/src/Shared/McgModule.cs +++ b/src/System.Private.Interop/src/Shared/McgModule.cs @@ -142,7 +142,7 @@ namespace System.Runtime.InteropServices { if (intfHashSet.Add(new EquatableRuntimeTypeHandle(typeHnd), typeHnd.GetHashCode())) { - Debug.Assert(false, "Duplicate RuntimeTypeHandle found in m_interfaceData"); + Debug.Fail("Duplicate RuntimeTypeHandle found in m_interfaceData"); } } } @@ -159,7 +159,7 @@ namespace System.Runtime.InteropServices { if (classHashSet.Add(new EquatableRuntimeTypeHandle(typeHnd), typeHnd.GetHashCode())) { - Debug.Assert(false, "Duplicate RuntimeTypeHandle found in m_classData"); + Debug.Fail("Duplicate RuntimeTypeHandle found in m_classData"); } } } diff --git a/src/System.Private.Interop/src/Shared/McgRemovedType.cs b/src/System.Private.Interop/src/Shared/McgRemovedType.cs index f8cced9e1..54cd2ec7a 100644 --- a/src/System.Private.Interop/src/Shared/McgRemovedType.cs +++ b/src/System.Private.Interop/src/Shared/McgRemovedType.cs @@ -12,7 +12,7 @@ namespace System.Runtime.InteropServices { public McgRemovedType() { - Debug.Assert(false, "A type that was removed by MCG dependency reduction has been instantiated."); + Debug.Fail("A type that was removed by MCG dependency reduction has been instantiated."); throw new Exception(SR.Arg_RemovedTypeInstantiated); } } diff --git a/src/System.Private.Interop/src/Shared/__ComObject.cs b/src/System.Private.Interop/src/Shared/__ComObject.cs index dbfcfa75b..1b3695e12 100644 --- a/src/System.Private.Interop/src/Shared/__ComObject.cs +++ b/src/System.Private.Interop/src/Shared/__ComObject.cs @@ -430,7 +430,7 @@ namespace System m_flags |= (ComObjectFlags.GCPressureWinRT_High | ComObjectFlags.GCPressure_Set); break; default: - Debug.Assert(false, "Incorrect GCPressure value"); + Debug.Fail("Incorrect GCPressure value"); return; } @@ -2449,7 +2449,7 @@ namespace System.Runtime.InteropServices int hr = ExternalInterop.CoGetContextToken(out pCookie); if (hr < 0) { - Debug.Assert(false, "CoGetContextToken failed"); + Debug.Fail("CoGetContextToken failed"); pCookie = default(IntPtr); } return new ContextCookie(pCookie); |