summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-10-22 20:42:07 -0700
committerJan Kotas <jkotas@microsoft.com>2017-10-24 01:14:37 -0700
commit339ccb881755acb4064423b64dc963a7260d3ab8 (patch)
tree653ee70f1c590df55716a83b661cf848bd3b9041
parent672efaf06bc55a7f58a9661f0c0c964b05f4c989 (diff)
downloadcoreclr-339ccb881755acb4064423b64dc963a7260d3ab8.tar.gz
coreclr-339ccb881755acb4064423b64dc963a7260d3ab8.tar.bz2
coreclr-339ccb881755acb4064423b64dc963a7260d3ab8.zip
Search/replace Debug.Assert(false, => Debug.Fail(
-rw-r--r--src/mscorlib/Common/System/SR.cs2
-rw-r--r--src/mscorlib/shared/System/Convert.cs2
-rw-r--r--src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs4
-rw-r--r--src/mscorlib/shared/System/Globalization/CalendarData.Unix.cs2
-rw-r--r--src/mscorlib/shared/System/Globalization/CalendarData.cs2
-rw-r--r--src/mscorlib/shared/System/Globalization/CalendricalCalculationsHelper.cs2
-rw-r--r--src/mscorlib/shared/System/Globalization/CultureData.Unix.cs8
-rw-r--r--src/mscorlib/shared/System/Globalization/DateTimeFormatInfo.cs4
-rw-r--r--src/mscorlib/shared/System/Globalization/DateTimeParse.cs2
-rw-r--r--src/mscorlib/shared/System/Lazy.cs4
-rw-r--r--src/mscorlib/src/Microsoft/Win32/RegistryKey.cs2
-rw-r--r--src/mscorlib/src/System/Array.cs2
-rw-r--r--src/mscorlib/src/System/Attribute.cs2
-rw-r--r--src/mscorlib/src/System/Collections/Hashtable.cs2
-rw-r--r--src/mscorlib/src/System/Enum.cs8
-rw-r--r--src/mscorlib/src/System/Environment.cs2
-rw-r--r--src/mscorlib/src/System/IO/File.cs2
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs6
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs2
-rw-r--r--src/mscorlib/src/System/Reflection/RuntimeParameterInfo.cs2
-rw-r--r--src/mscorlib/src/System/Resources/ManifestBasedResourceGroveler.cs8
-rw-r--r--src/mscorlib/src/System/RtType.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs6
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToCollectionAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIReferenceImpl.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs4
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs4
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs4
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapViewToReadOnlyCollectionAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorViewToReadOnlyCollectionAdapter.cs2
-rw-r--r--src/mscorlib/src/System/Runtime/MemoryFailPoint.cs2
-rw-r--r--src/mscorlib/src/System/SharedStatics.cs2
-rw-r--r--src/mscorlib/src/System/StubHelpers.cs6
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/Task.cs4
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/TaskContinuation.cs8
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/future.cs2
-rw-r--r--src/mscorlib/src/System/Tuple.cs2
-rw-r--r--src/mscorlib/src/System/WeakReference.cs2
52 files changed, 77 insertions, 77 deletions
diff --git a/src/mscorlib/Common/System/SR.cs b/src/mscorlib/Common/System/SR.cs
index 60c382092a..0b6db1298e 100644
--- a/src/mscorlib/Common/System/SR.cs
+++ b/src/mscorlib/Common/System/SR.cs
@@ -56,7 +56,7 @@ namespace System
{
if (key == null || key.Length == 0)
{
- Debug.Assert(false, "SR::GetResourceString with null or empty key. Bug in caller, or weird recursive loading problem?");
+ Debug.Fail("SR::GetResourceString with null or empty key. Bug in caller, or weird recursive loading problem?");
return key;
}
diff --git a/src/mscorlib/shared/System/Convert.cs b/src/mscorlib/shared/System/Convert.cs
index b6637b13fc..459127740b 100644
--- a/src/mscorlib/shared/System/Convert.cs
+++ b/src/mscorlib/shared/System/Convert.cs
@@ -2902,7 +2902,7 @@ namespace System
} // unchecked while
// 'd be nice to have an assert that we never get here, but CS0162: Unreachable code detected.
- // Debug.Assert(false, "We only leave the above loop by jumping; should never get here.");
+ // Debug.Fail("We only leave the above loop by jumping; should never get here.");
// We jump here out of the loop if we hit an '=':
_EqualityCharEncountered:
diff --git a/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs
index fb15213984..b79bec4f17 100644
--- a/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -4025,7 +4025,7 @@ namespace System.Diagnostics.Tracing
goto default;
break;
default:
- /* Debug.Assert(false, "Warning: User validation code sub-optimial: Unsuported opcode " + instrs[idx] +
+ /* Debug.Fail("Warning: User validation code sub-optimial: Unsuported opcode " + instrs[idx] +
" at " + idx + " in method " + method.Name); */
return -1;
}
@@ -4617,7 +4617,7 @@ namespace System.Diagnostics.Tracing
EventDispatcher cur = prev.m_Next;
if (cur == null)
{
- Debug.Assert(false, "EventSource did not have a registered EventListener!");
+ Debug.Fail("EventSource did not have a registered EventListener!");
break;
}
if (cur.m_Listener == listenerToRemove)
diff --git a/src/mscorlib/shared/System/Globalization/CalendarData.Unix.cs b/src/mscorlib/shared/System/Globalization/CalendarData.Unix.cs
index 35ee82d3cb..3a8029d9a0 100644
--- a/src/mscorlib/shared/System/Globalization/CalendarData.Unix.cs
+++ b/src/mscorlib/shared/System/Globalization/CalendarData.Unix.cs
@@ -325,7 +325,7 @@ namespace System.Globalization
}
catch (Exception e)
{
- Debug.Assert(false, e.ToString());
+ Debug.Fail(e.ToString());
// we ignore the managed exceptions here because EnumCalendarInfoCallback will get called from the native code.
// If we don't ignore the exception here that can cause the runtime to fail fast.
}
diff --git a/src/mscorlib/shared/System/Globalization/CalendarData.cs b/src/mscorlib/shared/System/Globalization/CalendarData.cs
index 0991149e07..ea70a1ce9a 100644
--- a/src/mscorlib/shared/System/Globalization/CalendarData.cs
+++ b/src/mscorlib/shared/System/Globalization/CalendarData.cs
@@ -105,7 +105,7 @@ namespace System.Globalization
if (!LoadCalendarDataFromSystem(localeName, calendarId))
{
- Debug.Assert(false, "[CalendarData] LoadCalendarDataFromSystem call isn't expected to fail for calendar " + calendarId + " locale " + localeName);
+ Debug.Fail("[CalendarData] LoadCalendarDataFromSystem call isn't expected to fail for calendar " + calendarId + " locale " + localeName);
// Something failed, try invariant for missing parts
// This is really not good, but we don't want the callers to crash.
diff --git a/src/mscorlib/shared/System/Globalization/CalendricalCalculationsHelper.cs b/src/mscorlib/shared/System/Globalization/CalendricalCalculationsHelper.cs
index 7de75d6aee..e0a3072b22 100644
--- a/src/mscorlib/shared/System/Globalization/CalendricalCalculationsHelper.cs
+++ b/src/mscorlib/shared/System/Globalization/CalendricalCalculationsHelper.cs
@@ -215,7 +215,7 @@ namespace System.Globalization
}
}
- Debug.Assert(false, "Not expected to come here");
+ Debug.Fail("Not expected to come here");
return DefaultEphemerisCorrection(year);
}
diff --git a/src/mscorlib/shared/System/Globalization/CultureData.Unix.cs b/src/mscorlib/shared/System/Globalization/CultureData.Unix.cs
index c21d8c3f22..3b4b60fc8a 100644
--- a/src/mscorlib/shared/System/Globalization/CultureData.Unix.cs
+++ b/src/mscorlib/shared/System/Globalization/CultureData.Unix.cs
@@ -148,7 +148,7 @@ namespace System.Globalization
{
// Failed, just use empty string
StringBuilderCache.Release(sb);
- Debug.Assert(false, "[CultureData.GetLocaleInfo(LocaleStringData)] Failed");
+ Debug.Fail("[CultureData.GetLocaleInfo(LocaleStringData)] Failed");
return String.Empty;
}
return StringBuilderCache.GetStringAndRelease(sb);
@@ -173,7 +173,7 @@ namespace System.Globalization
if (!result)
{
// Failed, just use 0
- Debug.Assert(false, "[CultureData.GetLocaleInfo(LocaleNumberData)] failed");
+ Debug.Fail("[CultureData.GetLocaleInfo(LocaleNumberData)] failed");
}
return value;
@@ -188,7 +188,7 @@ namespace System.Globalization
bool result = Interop.GlobalizationInterop.GetLocaleInfoGroupingSizes(_sWindowsName, (uint)type, ref primaryGroupingSize, ref secondaryGroupingSize);
if (!result)
{
- Debug.Assert(false, "[CultureData.GetLocaleInfo(LocaleGroupingData type)] failed");
+ Debug.Fail("[CultureData.GetLocaleInfo(LocaleGroupingData type)] failed");
}
if (secondaryGroupingSize == 0)
@@ -215,7 +215,7 @@ namespace System.Globalization
{
// Failed, just use empty string
StringBuilderCache.Release(sb);
- Debug.Assert(false, "[CultureData.GetTimeFormatString(bool shortFormat)] Failed");
+ Debug.Fail("[CultureData.GetTimeFormatString(bool shortFormat)] Failed");
return String.Empty;
}
diff --git a/src/mscorlib/shared/System/Globalization/DateTimeFormatInfo.cs b/src/mscorlib/shared/System/Globalization/DateTimeFormatInfo.cs
index 297b556f75..9dbfeb2d55 100644
--- a/src/mscorlib/shared/System/Globalization/DateTimeFormatInfo.cs
+++ b/src/mscorlib/shared/System/Globalization/DateTimeFormatInfo.cs
@@ -2839,7 +2839,7 @@ namespace System.Globalization
}
previousNode = temp;
};
- Debug.Assert(false, "The hashtable is full. This should not happen.");
+ Debug.Fail("The hashtable is full. This should not happen.");
}
private void InsertHash(TokenHashValue[] hashTable, String str, TokenType tokenType, int tokenValue)
@@ -2927,7 +2927,7 @@ namespace System.Globalization
hashcode += hashProbe;
if (hashcode >= TOKEN_HASH_SIZE) hashcode -= TOKEN_HASH_SIZE;
} while (i < TOKEN_HASH_SIZE);
- Debug.Assert(false, "The hashtable is full. This should not happen.");
+ Debug.Fail("The hashtable is full. This should not happen.");
}
private bool CompareStringIgnoreCaseOptimized(string string1, int offset1, int length1, string string2, int offset2, int length2)
diff --git a/src/mscorlib/shared/System/Globalization/DateTimeParse.cs b/src/mscorlib/shared/System/Globalization/DateTimeParse.cs
index 2b0f41ae6b..ca6fe635b8 100644
--- a/src/mscorlib/shared/System/Globalization/DateTimeParse.cs
+++ b/src/mscorlib/shared/System/Globalization/DateTimeParse.cs
@@ -4647,7 +4647,7 @@ new DS[] { DS.ERROR, DS.TX_NNN, DS.TX_NNN, DS.TX_NNN, DS.ERROR, DS.ERROR,
case ParseFailureKind.FormatBadDateTimeCalendar:
return new FormatException(SR.Format(SR.GetResourceString(result.failureMessageID), result.calendar));
default:
- Debug.Assert(false, "Unkown DateTimeParseFailure: " + result);
+ Debug.Fail("Unkown DateTimeParseFailure: " + result);
return null;
}
}
diff --git a/src/mscorlib/shared/System/Lazy.cs b/src/mscorlib/shared/System/Lazy.cs
index e71a37dd9e..4a56b1881f 100644
--- a/src/mscorlib/shared/System/Lazy.cs
+++ b/src/mscorlib/shared/System/Lazy.cs
@@ -84,7 +84,7 @@ namespace System
break;
default:
- Debug.Assert(false, "internal constructor, this should never occur");
+ Debug.Fail("internal constructor, this should never occur");
break;
}
@@ -119,7 +119,7 @@ namespace System
return LazyThreadSafetyMode.ExecutionAndPublication;
default:
- Debug.Assert(false, "Invalid logic; State should always have a valid value");
+ Debug.Fail("Invalid logic; State should always have a valid value");
return default(LazyThreadSafetyMode);
}
}
diff --git a/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs b/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs
index 6412a8f331..350880e52f 100644
--- a/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs
+++ b/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs
@@ -539,7 +539,7 @@ namespace Microsoft.Win32
if (datasize < 0)
{
// unexpected code path
- Debug.Assert(false, "[InternalGetValue] RegQueryValue returned ERROR_SUCCESS but gave a negative datasize");
+ Debug.Fail("[InternalGetValue] RegQueryValue returned ERROR_SUCCESS but gave a negative datasize");
datasize = 0;
}
diff --git a/src/mscorlib/src/System/Array.cs b/src/mscorlib/src/System/Array.cs
index 0841d7ac63..7be16c40e4 100644
--- a/src/mscorlib/src/System/Array.cs
+++ b/src/mscorlib/src/System/Array.cs
@@ -2455,7 +2455,7 @@ namespace System
// It is never legal to instantiate this class.
private SZArrayHelper()
{
- Debug.Assert(false, "Hey! How'd I get here?");
+ Debug.Fail("Hey! How'd I get here?");
}
// -----------------------------------------------------------
diff --git a/src/mscorlib/src/System/Attribute.cs b/src/mscorlib/src/System/Attribute.cs
index 37445cc23b..5934284c0f 100644
--- a/src/mscorlib/src/System/Attribute.cs
+++ b/src/mscorlib/src/System/Attribute.cs
@@ -627,7 +627,7 @@ namespace System
return element.IsDefined(attributeType, false);
default:
- Debug.Assert(false, "Invalid type for ParameterInfo member in Attribute class");
+ Debug.Fail("Invalid type for ParameterInfo member in Attribute class");
throw new ArgumentException(SR.Argument_InvalidParamInfo);
}
}
diff --git a/src/mscorlib/src/System/Collections/Hashtable.cs b/src/mscorlib/src/System/Collections/Hashtable.cs
index 0550030e7c..0907429f44 100644
--- a/src/mscorlib/src/System/Collections/Hashtable.cs
+++ b/src/mscorlib/src/System/Collections/Hashtable.cs
@@ -797,7 +797,7 @@ namespace System.Collections
// If you see this assert, make sure load factor & count are reasonable.
// Then verify that our double hash function (h2, described at top of file)
// meets the requirements described above. You should never see this assert.
- Debug.Assert(false, "hash table insert failed! Load factor too high, or our double hashing function is incorrect.");
+ Debug.Fail("hash table insert failed! Load factor too high, or our double hashing function is incorrect.");
throw new InvalidOperationException(SR.InvalidOperation_HashInsertFailed);
}
diff --git a/src/mscorlib/src/System/Enum.cs b/src/mscorlib/src/System/Enum.cs
index 96bf31c889..af6cc9c148 100644
--- a/src/mscorlib/src/System/Enum.cs
+++ b/src/mscorlib/src/System/Enum.cs
@@ -340,7 +340,7 @@ namespace System
return m_innerException;
default:
- Debug.Assert(false, "Unknown EnumParseFailure: " + m_failure);
+ Debug.Fail("Unknown EnumParseFailure: " + m_failure);
return new ArgumentException(SR.Arg_EnumValueNotFound);
}
}
@@ -757,7 +757,7 @@ namespace System
case CorElementType.U:
return *(UIntPtr*)pValue;
default:
- Debug.Assert(false, "Invalid primitive type");
+ Debug.Fail("Invalid primitive type");
return null;
}
}
@@ -809,7 +809,7 @@ namespace System
return *(uint*)pValue;
}
default:
- Debug.Assert(false, "Invalid primitive type");
+ Debug.Fail("Invalid primitive type");
return 0;
}
}
@@ -866,7 +866,7 @@ namespace System
case CorElementType.U:
return (*(UIntPtr*)pValue).GetHashCode();
default:
- Debug.Assert(false, "Invalid primitive type");
+ Debug.Fail("Invalid primitive type");
return 0;
}
}
diff --git a/src/mscorlib/src/System/Environment.cs b/src/mscorlib/src/System/Environment.cs
index ec9f043487..f230577fac 100644
--- a/src/mscorlib/src/System/Environment.cs
+++ b/src/mscorlib/src/System/Environment.cs
@@ -773,7 +773,7 @@ namespace System
IntPtr r = Interop.User32.SendMessageTimeout(new IntPtr(Interop.User32.HWND_BROADCAST),
Interop.User32.WM_SETTINGCHANGE, IntPtr.Zero, "Environment", 0, 1000, IntPtr.Zero);
- if (r == IntPtr.Zero) Debug.Assert(false, "SetEnvironmentVariable failed: " + Marshal.GetLastWin32Error());
+ Debug.Assert(r != IntPtr.Zero, "SetEnvironmentVariable failed: " + Marshal.GetLastWin32Error());
#endif // FEATURE_WIN32_REGISTRY
}
}
diff --git a/src/mscorlib/src/System/IO/File.cs b/src/mscorlib/src/System/IO/File.cs
index b393feac3f..6754baae16 100644
--- a/src/mscorlib/src/System/IO/File.cs
+++ b/src/mscorlib/src/System/IO/File.cs
@@ -193,7 +193,7 @@ namespace System.IO
// if we're already returning an error, don't throw another one.
if (!error)
{
- Debug.Assert(false, "File::FillAttributeInfo - FindClose failed!");
+ Debug.Fail("File::FillAttributeInfo - FindClose failed!");
throw Win32Marshal.GetExceptionForLastWin32Error();
}
}
diff --git a/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
index cdc9f469b3..94a9becf98 100644
--- a/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
@@ -348,7 +348,7 @@ namespace System.Reflection.Emit
writer.Write((byte)CustomAttributeEncoding.Double);
break;
default:
- Debug.Assert(false, "Invalid primitive type");
+ Debug.Fail("Invalid primitive type");
break;
}
}
@@ -432,7 +432,7 @@ namespace System.Reflection.Emit
writer.Write((ulong)value);
break;
default:
- Debug.Assert(false, "Invalid enum base type");
+ Debug.Fail("Invalid enum base type");
break;
}
}
@@ -509,7 +509,7 @@ namespace System.Reflection.Emit
writer.Write((double)value);
break;
default:
- Debug.Assert(false, "Invalid primitive type");
+ Debug.Fail("Invalid primitive type");
break;
}
}
diff --git a/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
index fda22ab1d6..928b2e3084 100644
--- a/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
@@ -352,7 +352,7 @@ namespace System.Reflection.Emit
}
else
{
- Debug.Assert(false, "We should never get here!");
+ Debug.Fail("We should never get here!");
return null;
}
}
diff --git a/src/mscorlib/src/System/Reflection/RuntimeParameterInfo.cs b/src/mscorlib/src/System/Reflection/RuntimeParameterInfo.cs
index 5048af3950..e9d27ef7ae 100644
--- a/src/mscorlib/src/System/Reflection/RuntimeParameterInfo.cs
+++ b/src/mscorlib/src/System/Reflection/RuntimeParameterInfo.cs
@@ -403,7 +403,7 @@ namespace System.Reflection
if (namedArgument.MemberInfo.Name.Equals("Value"))
{
// This is not possible because Decimal cannot be represented directly in the metadata.
- Debug.Assert(false, "Decimal cannot be represented directly in the metadata.");
+ Debug.Fail("Decimal cannot be represented directly in the metadata.");
return (Decimal)namedArgument.TypedValue.Value;
}
}
diff --git a/src/mscorlib/src/System/Resources/ManifestBasedResourceGroveler.cs b/src/mscorlib/src/System/Resources/ManifestBasedResourceGroveler.cs
index 4548b93dd4..83d5b6c8e8 100644
--- a/src/mscorlib/src/System/Resources/ManifestBasedResourceGroveler.cs
+++ b/src/mscorlib/src/System/Resources/ManifestBasedResourceGroveler.cs
@@ -180,7 +180,7 @@ namespace System.Resources
// fires, please fix the build process for the BCL directory.
if (a == typeof(Object).Assembly)
{
- Debug.Assert(false, System.CoreLib.Name + "'s NeutralResourcesLanguageAttribute is a malformed culture name! name: \"" + cultureName + "\" Exception: " + e);
+ Debug.Fail(System.CoreLib.Name + "'s NeutralResourcesLanguageAttribute is a malformed culture name! name: \"" + cultureName + "\" Exception: " + e);
return CultureInfo.InvariantCulture;
}
@@ -417,14 +417,14 @@ namespace System.Resources
int hr = fle._HResult;
if (hr != Win32Marshal.MakeHRFromErrorCode(Win32Native.ERROR_ACCESS_DENIED))
{
- Debug.Assert(false, "[This assert catches satellite assembly build/deployment problems - report this message to your build lab & loc engineer]" + Environment.NewLine + "GetSatelliteAssembly failed for culture " + lookForCulture.Name + " and version " + (_mediator.SatelliteContractVersion == null ? _mediator.MainAssembly.GetVersion().ToString() : _mediator.SatelliteContractVersion.ToString()) + " of assembly " + _mediator.MainAssembly.GetSimpleName() + " with error code 0x" + hr.ToString("X", CultureInfo.InvariantCulture) + Environment.NewLine + "Exception: " + fle);
+ Debug.Fail("[This assert catches satellite assembly build/deployment problems - report this message to your build lab & loc engineer]" + Environment.NewLine + "GetSatelliteAssembly failed for culture " + lookForCulture.Name + " and version " + (_mediator.SatelliteContractVersion == null ? _mediator.MainAssembly.GetVersion().ToString() : _mediator.SatelliteContractVersion.ToString()) + " of assembly " + _mediator.MainAssembly.GetSimpleName() + " with error code 0x" + hr.ToString("X", CultureInfo.InvariantCulture) + Environment.NewLine + "Exception: " + fle);
}
}
// Don't throw for zero-length satellite assemblies, for compat with v1
catch (BadImageFormatException bife)
{
- Debug.Assert(false, "[This assert catches satellite assembly build/deployment problems - report this message to your build lab & loc engineer]" + Environment.NewLine + "GetSatelliteAssembly failed for culture " + lookForCulture.Name + " and version " + (_mediator.SatelliteContractVersion == null ? _mediator.MainAssembly.GetVersion().ToString() : _mediator.SatelliteContractVersion.ToString()) + " of assembly " + _mediator.MainAssembly.GetSimpleName() + Environment.NewLine + "Exception: " + bife);
+ Debug.Fail("[This assert catches satellite assembly build/deployment problems - report this message to your build lab & loc engineer]" + Environment.NewLine + "GetSatelliteAssembly failed for culture " + lookForCulture.Name + " and version " + (_mediator.SatelliteContractVersion == null ? _mediator.MainAssembly.GetVersion().ToString() : _mediator.SatelliteContractVersion.ToString()) + " of assembly " + _mediator.MainAssembly.GetSimpleName() + Environment.NewLine + "Exception: " + bife);
}
return satellite;
@@ -505,7 +505,7 @@ namespace System.Resources
if (_mediator.MainAssembly == typeof(Object).Assembly && _mediator.BaseName.Equals(System.CoreLib.Name))
{
// This would break CultureInfo & all our exceptions.
- Debug.Assert(false, "Couldn't get " + System.CoreLib.Name + ResourceManager.ResFileExtension + " from " + System.CoreLib.Name + "'s assembly" + Environment.NewLine + Environment.NewLine + "Are you building the runtime on your machine? Chances are the BCL directory didn't build correctly. Type 'build -c' in the BCL directory. If you get build errors, look at buildd.log. If you then can't figure out what's wrong (and you aren't changing the assembly-related metadata code), ask a BCL dev.\n\nIf you did NOT build the runtime, you shouldn't be seeing this and you've found a bug.");
+ Debug.Fail("Couldn't get " + System.CoreLib.Name + ResourceManager.ResFileExtension + " from " + System.CoreLib.Name + "'s assembly" + Environment.NewLine + Environment.NewLine + "Are you building the runtime on your machine? Chances are the BCL directory didn't build correctly. Type 'build -c' in the BCL directory. If you get build errors, look at buildd.log. If you then can't figure out what's wrong (and you aren't changing the assembly-related metadata code), ask a BCL dev.\n\nIf you did NOT build the runtime, you shouldn't be seeing this and you've found a bug.");
// We cannot continue further - simply FailFast.
string mesgFailFast = System.CoreLib.Name + ResourceManager.ResFileExtension + " couldn't be found! Large parts of the BCL won't work!";
diff --git a/src/mscorlib/src/System/RtType.cs b/src/mscorlib/src/System/RtType.cs
index 249b68e3f6..c8c4e0abf3 100644
--- a/src/mscorlib/src/System/RtType.cs
+++ b/src/mscorlib/src/System/RtType.cs
@@ -389,7 +389,7 @@ namespace System
list = PopulateInterfaces(filter);
break;
default:
- Debug.Assert(false, "Invalid CacheType");
+ Debug.Fail("Invalid CacheType");
break;
}
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs b/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
index 197de23c70..01b803b697 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
@@ -173,7 +173,7 @@ namespace System.Runtime.CompilerServices
if (oceEdi != null)
{
oceEdi.Throw();
- Debug.Assert(false, "Throw() should have thrown");
+ Debug.Fail("Throw() should have thrown");
}
throw new TaskCanceledException(task);
@@ -184,12 +184,12 @@ namespace System.Runtime.CompilerServices
if (edis.Count > 0)
{
edis[0].Throw();
- Debug.Assert(false, "Throw() should have thrown");
+ Debug.Fail("Throw() should have thrown");
break; // Necessary to compile: non-reachable, but compiler can't determine that
}
else
{
- Debug.Assert(false, "There should be exceptions if we're Faulted.");
+ Debug.Fail("There should be exceptions if we're Faulted.");
throw task.Exception;
}
}
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs
index 4c5b94fb43..7970324fef 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs
@@ -167,7 +167,7 @@ namespace System.Runtime.InteropServices
// Migrating InheritanceDemands requires this default ctor, so we can mark it critical
protected SafeHandle()
{
- Debug.Assert(false, "SafeHandle's protected default ctor should never be used!");
+ Debug.Fail("SafeHandle's protected default ctor should never be used!");
throw new NotImplementedException();
}
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToCollectionAdapter.cs
index 014e63e89d..60686a8705 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToCollectionAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToCollectionAdapter.cs
@@ -27,7 +27,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private BindableVectorToCollectionAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// int Count { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs
index 122c7a1b13..aa270a2aee 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs
@@ -27,7 +27,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private BindableVectorToListAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// object this[int index] { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs
index 8e3856dc4f..2d15e31c26 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs
@@ -439,7 +439,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
else
{
- Debug.Assert(false, "T in coersion function wasn't understood as a type that can be coerced - make sure that CoerceScalarValue and NumericScalarTypes are in sync");
+ Debug.Fail("T in coersion function wasn't understood as a type that can be coerced - make sure that CoerceScalarValue and NumericScalarTypes are in sync");
}
}
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIReferenceImpl.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIReferenceImpl.cs
index 7dc82ed51b..97473856ba 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIReferenceImpl.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIReferenceImpl.cs
@@ -303,7 +303,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
return Activator.CreateInstance(specificType, new Object[] { propType.Value, obj });
}
- Debug.Assert(false, "We should not see non-WinRT type here");
+ Debug.Fail("We should not see non-WinRT type here");
return null;
}
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs
index 5d9f332a61..0a6f6e0c23 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs
@@ -28,7 +28,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private DictionaryToMapAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// V Lookup(K key)
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs
index 95158b093d..d39516d117 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs
@@ -25,7 +25,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private EnumerableToIterableAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// This method is invoked when First is called on a managed implementation of IIterable<T>.
@@ -40,7 +40,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private EnumerableToBindableIterableAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
internal sealed class NonGenericToGenericEnumerator : IEnumerator<object>
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
index 564b86e685..17624dfd1f 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IClosable.cs
@@ -26,7 +26,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IDisposableToIClosableAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
public void Close()
@@ -41,7 +41,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IClosableToIDisposableAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
private void Dispose()
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs
index aa7bf76750..4fbcd9975d 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs
@@ -27,7 +27,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IMapViewToIReadOnlyDictionaryAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// V this[K key] { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs
index f5bc58a7e5..64d16abe65 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs
@@ -27,7 +27,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IReadOnlyDictionaryToIMapViewAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// V Lookup(K key)
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs
index c69115d1eb..cd41ea0e69 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs
@@ -27,7 +27,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IReadOnlyListToIVectorViewAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// T GetAt(uint index)
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs
index 1445670680..50149799e0 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs
@@ -29,7 +29,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IVectorViewToIReadOnlyListAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// T this[int index] { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs
index 7bc2fa06a9..e681533f6b 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs
@@ -28,7 +28,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private IterableToEnumerableAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// This method is invoked when GetEnumerator is called on a WinRT-backed implementation of IEnumerable<T>.
@@ -68,7 +68,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private BindableIterableToEnumerableAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
private sealed class NonGenericToGenericIterator : IIterator<object>
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs
index c0c8769b5a..2465908a2a 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs
@@ -28,7 +28,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private ListToBindableVectorAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// object GetAt(uint index)
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs
index 4f23f639f2..8c7dfcaf04 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs
@@ -28,7 +28,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private ListToVectorAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// T GetAt(uint index)
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
index 8cc189b162..50e5f5e337 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToCollectionAdapter.cs
@@ -29,7 +29,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private MapToCollectionAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// int Count { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs
index a69acb7eeb..b8c4de8fb2 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs
@@ -26,7 +26,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private MapToDictionaryAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// V this[K key] { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapViewToReadOnlyCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapViewToReadOnlyCollectionAdapter.cs
index 16e21e21a1..1e2a5f09c1 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapViewToReadOnlyCollectionAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapViewToReadOnlyCollectionAdapter.cs
@@ -29,7 +29,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private MapViewToReadOnlyCollectionAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// int Count { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs
index ff10971f91..07617929c8 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToCollectionAdapter.cs
@@ -26,7 +26,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private VectorToCollectionAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// int Count { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs
index 3e4e5ad67d..2c94129cd4 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs
@@ -26,7 +26,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private VectorToListAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// T this[int index] { get }
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorViewToReadOnlyCollectionAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorViewToReadOnlyCollectionAdapter.cs
index 679060bf4d..dcaa97fddb 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorViewToReadOnlyCollectionAdapter.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorViewToReadOnlyCollectionAdapter.cs
@@ -26,7 +26,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
private VectorViewToReadOnlyCollectionAdapter()
{
- Debug.Assert(false, "This class is never instantiated");
+ Debug.Fail("This class is never instantiated");
}
// int Count { get }
diff --git a/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs b/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs
index 899bd44d96..e7bf0c58f0 100644
--- a/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs
+++ b/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs
@@ -285,7 +285,7 @@ namespace System.Runtime
break;
default:
- Debug.Assert(false, "Fell through switch statement!");
+ Debug.Fail("Fell through switch statement!");
break;
}
}
diff --git a/src/mscorlib/src/System/SharedStatics.cs b/src/mscorlib/src/System/SharedStatics.cs
index 09709874a9..8111b9b1d1 100644
--- a/src/mscorlib/src/System/SharedStatics.cs
+++ b/src/mscorlib/src/System/SharedStatics.cs
@@ -29,7 +29,7 @@ namespace System
// when we set up _sharedStatics via AppDomain::SetupSharedStatics
private SharedStatics()
{
- Debug.Assert(false, "SharedStatics..ctor() is never called.");
+ Debug.Fail("SharedStatics..ctor() is never called.");
}
// This is the total amount of memory currently "reserved" via
diff --git a/src/mscorlib/src/System/StubHelpers.cs b/src/mscorlib/src/System/StubHelpers.cs
index d9bf7caf62..d9a7e1277e 100644
--- a/src/mscorlib/src/System/StubHelpers.cs
+++ b/src/mscorlib/src/System/StubHelpers.cs
@@ -472,19 +472,19 @@ namespace System.StubHelpers
{
static internal IntPtr ConvertToNative(string strManaged)
{
- Debug.Assert(false, "NYI");
+ Debug.Fail("NYI");
return IntPtr.Zero;
}
static internal unsafe string ConvertToManaged(IntPtr bstr)
{
- Debug.Assert(false, "NYI");
+ Debug.Fail("NYI");
return null;
}
static internal void ClearNative(IntPtr pNative)
{
- Debug.Assert(false, "NYI");
+ Debug.Fail("NYI");
}
} // class WSTRBufferMarshaler
diff --git a/src/mscorlib/src/System/Threading/Tasks/Task.cs b/src/mscorlib/src/System/Threading/Tasks/Task.cs
index 4fdad9fa19..37ae347649 100644
--- a/src/mscorlib/src/System/Threading/Tasks/Task.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/Task.cs
@@ -2498,7 +2498,7 @@ namespace System.Threading.Tasks
actionWithState(m_stateObject);
return;
}
- Debug.Assert(false, "Invalid m_action in Task");
+ Debug.Fail("Invalid m_action in Task");
}
/// <summary>
@@ -6606,7 +6606,7 @@ namespace System.Threading.Tasks
Debug.Assert(result, "Expected TrySetFromTask from inner task to succeed");
break;
default:
- Debug.Assert(false, "UnwrapPromise in illegal state");
+ Debug.Fail("UnwrapPromise in illegal state");
break;
}
}
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskContinuation.cs b/src/mscorlib/src/System/Threading/Tasks/TaskContinuation.cs
index 06539f956c..8835eb542d 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskContinuation.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskContinuation.cs
@@ -65,7 +65,7 @@ namespace System.Threading.Tasks
actionWithState(antecedent, m_stateObject);
return;
}
- Debug.Assert(false, "Invalid m_action in ContinuationTaskFromTask");
+ Debug.Fail("Invalid m_action in ContinuationTaskFromTask");
}
}
@@ -112,7 +112,7 @@ namespace System.Threading.Tasks
m_result = funcWithState(antecedent, m_stateObject);
return;
}
- Debug.Assert(false, "Invalid m_action in ContinuationResultTaskFromTask");
+ Debug.Fail("Invalid m_action in ContinuationResultTaskFromTask");
}
}
@@ -159,7 +159,7 @@ namespace System.Threading.Tasks
actionWithState(antecedent, m_stateObject);
return;
}
- Debug.Assert(false, "Invalid m_action in ContinuationTaskFromResultTask");
+ Debug.Fail("Invalid m_action in ContinuationTaskFromResultTask");
}
}
@@ -206,7 +206,7 @@ namespace System.Threading.Tasks
m_result = funcWithState(antecedent, m_stateObject);
return;
}
- Debug.Assert(false, "Invalid m_action in ContinuationResultTaskFromResultTask");
+ Debug.Fail("Invalid m_action in ContinuationResultTaskFromResultTask");
}
}
diff --git a/src/mscorlib/src/System/Threading/Tasks/future.cs b/src/mscorlib/src/System/Threading/Tasks/future.cs
index d114f892f0..f9199d35cc 100644
--- a/src/mscorlib/src/System/Threading/Tasks/future.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/future.cs
@@ -616,7 +616,7 @@ namespace System.Threading.Tasks
m_result = funcWithState(m_stateObject);
return;
}
- Debug.Assert(false, "Invalid m_action in Task<TResult>");
+ Debug.Fail("Invalid m_action in Task<TResult>");
}
#region Await Support
diff --git a/src/mscorlib/src/System/Tuple.cs b/src/mscorlib/src/System/Tuple.cs
index 3381c750d0..dce9a53c0e 100644
--- a/src/mscorlib/src/System/Tuple.cs
+++ b/src/mscorlib/src/System/Tuple.cs
@@ -1195,7 +1195,7 @@ namespace System
case 7:
return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer));
}
- Debug.Assert(false, "Missed all cases for computing Tuple hash code");
+ Debug.Fail("Missed all cases for computing Tuple hash code");
return -1;
}
diff --git a/src/mscorlib/src/System/WeakReference.cs b/src/mscorlib/src/System/WeakReference.cs
index bde7586590..b99e3683a6 100644
--- a/src/mscorlib/src/System/WeakReference.cs
+++ b/src/mscorlib/src/System/WeakReference.cs
@@ -30,7 +30,7 @@ namespace System
// Migrating InheritanceDemands requires this default ctor, so we can mark it SafeCritical
protected WeakReference()
{
- Debug.Assert(false, "WeakReference's protected default ctor should never be used!");
+ Debug.Fail("WeakReference's protected default ctor should never be used!");
throw new NotImplementedException();
}