651 references to Assert
Aspire.Dashboard (1)
CodeStyleConfigFileGenerator (1)
dotnet (1)
dotnet-watch (2)
http2cat (2)
IIS.FunctionalTests (2)
IIS.LongTests (2)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IISExpress.FunctionalTests (2)
illink (1)
IOperationGenerator (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Microsoft.AspNetCore.OpenApi (3)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Microsoft.AspNetCore.Shared.Tests (2)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.StaticAssets (4)
Microsoft.Build (1)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.CSharp (6)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (2)
Microsoft.Extensions.AI.OpenAI (7)
src\Shared\ServerSentEvents\SseParser_1.cs (6)
282Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}");
283Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}");
284Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}");
286Debug.Assert(searchLength >= 0, $"{searchLength}");
287Debug.Assert(searchLength <= _lineLength, $"{searchLength}, {_lineLength}");
548Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}");
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Validation.GeneratorTests (1)
Microsoft.WebTools.AspireService.Package (1)
Microsoft.WebTools.AspireService.Tests (1)
PresentationBuildTasks (4)
PresentationFramework (15)
Shared (7)
ServerSentEvents\SseParser_1.cs (6)
282Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}");
283Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}");
284Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}");
286Debug.Assert(searchLength >= 0, $"{searchLength}");
287Debug.Assert(searchLength <= _lineLength, $"{searchLength}, {_lineLength}");
548Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}");
System.Collections (1)
System.Collections.Concurrent (4)
System.ComponentModel.TypeConverter (7)
System.Data.Common (37)
System\Data\Filter\FunctionNode.cs (18)
321Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
332Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
344Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
348Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
352Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
356Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
360Debug.Assert(_argumentCount == 2, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
362Debug.Assert(argumentValues[0] is string, $"Invalid argument type for {s_funcs[_info]._name}");
363Debug.Assert(argumentValues[1] is string, $"Invalid argument type for {s_funcs[_info]._name}");
377Debug.Assert(_argumentCount == 3, $"Invalid argument argumentCount: {_argumentCount.ToString(FormatProvider)}");
404Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
405Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}");
423Debug.Assert(_argumentCount == 3, $"Invalid argument argumentCount: {_argumentCount.ToString(FormatProvider)}");
424Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid first argument {argumentValues[0].GetType().FullName} in {s_funcs[_info]._name}");
425Debug.Assert(argumentValues[1] is int, $"Invalid second argument {argumentValues[1].GetType().FullName} in {s_funcs[_info]._name}");
426Debug.Assert(argumentValues[2] is int, $"Invalid third argument {argumentValues[2].GetType().FullName} in {s_funcs[_info]._name}");
465Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
466Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}");
System.Data.Odbc (6)
System.Diagnostics.Process (2)
System.Drawing.Common (14)
System.Drawing.Primitives (1)
System.Formats.Asn1 (3)
System.Formats.Tar (1)
System.IO.Compression.Brotli (1)
System.IO.FileSystem.DriveInfo (2)
System.IO.Ports (1)
System.Linq.Expressions (3)
System.Net.Http (39)
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (8)
71Debug.Assert(byteCount <= ActiveMemory.Length, $"MultiArrayBuffer.Discard: Expected byteCount={byteCount} <= {ActiveMemory.Length}");
121Debug.Assert(byteCount <= AvailableMemory.Length, $"MultiArrayBuffer.Commit: Expected byteCount={byteCount} <= {AvailableMemory.Length}");
220Debug.Assert(_activeStart / BlockSize == 0, $"Start is not in first block after move or resize?? _activeStart={_activeStart}");
257Debug.Assert(_allocatedEnd % BlockSize == 0, $"_allocatedEnd={_allocatedEnd} not at block boundary?");
279Debug.Assert(_activeStart == 0, $"No active bytes but _activeStart={_activeStart}");
355Debug.Assert(0 <= startInBlock, $"Invalid startInBlock={startInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
356Debug.Assert(startInBlock < endInBlock, $"Invalid startInBlock={startInBlock}, endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
357Debug.Assert(endInBlock <= BlockSize, $"Invalid endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
System.Net.HttpListener (1)
System.Net.Mail (12)
System.Net.NameResolution (3)
System.Net.Ping (3)
System.Net.Primitives (1)
System.Net.Quic (12)
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (8)
71Debug.Assert(byteCount <= ActiveMemory.Length, $"MultiArrayBuffer.Discard: Expected byteCount={byteCount} <= {ActiveMemory.Length}");
121Debug.Assert(byteCount <= AvailableMemory.Length, $"MultiArrayBuffer.Commit: Expected byteCount={byteCount} <= {AvailableMemory.Length}");
220Debug.Assert(_activeStart / BlockSize == 0, $"Start is not in first block after move or resize?? _activeStart={_activeStart}");
257Debug.Assert(_allocatedEnd % BlockSize == 0, $"_allocatedEnd={_allocatedEnd} not at block boundary?");
279Debug.Assert(_activeStart == 0, $"No active bytes but _activeStart={_activeStart}");
355Debug.Assert(0 <= startInBlock, $"Invalid startInBlock={startInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
356Debug.Assert(startInBlock < endInBlock, $"Invalid startInBlock={startInBlock}, endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
357Debug.Assert(endInBlock <= BlockSize, $"Invalid endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
System.Net.Requests (1)
System.Net.Security (5)
System.Net.ServerSentEvents (7)
System\Net\ServerSentEvents\SseParser_1.cs (6)
266Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}");
267Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}");
268Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}");
270Debug.Assert(searchLength >= 0, $"{searchLength}");
271Debug.Assert(searchLength <= _lineLength, $"{searchLength}, {_lineLength}");
524Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}");
System.Net.Sockets (41)
System\Net\Sockets\SocketAsyncContext.Unix.cs (22)
164Debug.Assert(oldState == State.Waiting, $"Unexpected operation state: {(State)oldState}");
182Debug.Assert(state is State.Running or State.RunningWithPendingCancellation, $"Unexpected operation state: {(State)state}");
258Debug.Assert(!Interlocked.Exchange(ref _callbackQueued, true), $"Unexpected _callbackQueued: {_callbackQueued}");
627Debug.Assert(ErrorCode == SocketError.Success || AcceptedFileDescriptor == (IntPtr)(-1), $"Unexpected values: ErrorCode={ErrorCode}, AcceptedFileDescriptor={AcceptedFileDescriptor}");
1046Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!");
1074Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!");
1105Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!");
1376Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1451Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
1458Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}");
1476Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
1486Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}");
1514Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
1541Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
1608Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1753Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1822Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1859Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1951Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1983Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
2062Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
2132Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
System\Net\Sockets\SocketPal.Unix.cs (9)
89Debug.Assert(fd == (IntPtr)(-1), $"Unexpected fd: {fd}");
673Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
747Debug.Assert(err == Interop.Error.EBADF, $"Unexpected err: {err}");
1534Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName: {optionName}");
1557Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}");
1705Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}");
1730Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}");
1950Debug.Assert(offset == eventsLength, $"Invalid adds. offset={offset}, eventsLength={eventsLength}.");
1951Debug.Assert(refsAdded == eventsLength, $"Invalid ref adds. refsAdded={refsAdded}, eventsLength={eventsLength}.");
System.Net.WebSockets (10)
System\Net\WebSockets\ManagedWebSocket.cs (10)
146Debug.Assert(keepAliveInterval == Timeout.InfiniteTimeSpan || keepAliveInterval >= TimeSpan.Zero, $"Invalid {nameof(keepAliveInterval)}: {keepAliveInterval}");
147Debug.Assert(keepAliveTimeout == Timeout.InfiniteTimeSpan || keepAliveTimeout >= TimeSpan.Zero, $"Invalid {nameof(keepAliveTimeout)}: {keepAliveTimeout}");
708Debug.Assert(sendBuffer.Length >= MaxMessageHeaderLength, $"Expected {nameof(sendBuffer)} to be at least {MaxMessageHeaderLength}, got {sendBuffer.Length}");
882Debug.Assert(header.Opcode == MessageOpcode.Binary || header.Opcode == MessageOpcode.Text, $"Unexpected opcode {header.Opcode}");
1427Debug.Assert(
1566Debug.Assert(count >= 0, $"Expected non-negative {nameof(count)}, got {count}");
1567Debug.Assert(count <= _receiveBufferCount, $"Trying to consume {count}, which is more than exists {_receiveBufferCount}");
1575Debug.Assert(minimumRequiredBytes <= _receiveBuffer.Length, $"Requested number of bytes {minimumRequiredBytes} must not exceed {_receiveBuffer.Length}");
1645Debug.Assert(maskOffsetIndex < MaskLength, $"Unexpected {nameof(maskOffsetIndex)}: {maskOffsetIndex}");
1646Debug.Assert(mask.Length >= MaskLength + maskOffset, $"Unexpected inputs: {mask.Length}, {maskOffset}");
System.Numerics.Tensors (1)
System.Private.CoreLib (56)
System.Private.DataContractSerialization (1)
System.Private.Uri (3)
System.Private.Windows.Core (1)
System.Private.Xml (42)
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (17)
418Debug.Assert(_xstate == XmlState.WithinSequence, $"StartTree cannot be called in the {_xstate} state.");
429Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"EndTree cannot be called in the {_xstate} state.");
445Debug.Assert(_xstate == XmlState.WithinContent, $"WriteStartElement cannot be called in the {_xstate} state.");
468Debug.Assert(_xstate == XmlState.EnumAttrs, $"StartElementContent cannot be called in the {_xstate} state.");
483Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"WriteEndElement cannot be called in the {_xstate} state.");
503Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteStartAttribute cannot be called in the {_xstate} state.");
522Debug.Assert(_xstate == XmlState.WithinAttr, $"WriteEndAttribute cannot be called in the {_xstate} state.");
538Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteNamespaceDeclaration cannot be called in the {_xstate} state.");
571Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlock cannot be called in the {_xstate} state.");
580Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlockNoEntities cannot be called in the {_xstate} state.");
761Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteNamespaceString cannot be called in the {_xstate} state.");
770Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteEndNamespace cannot be called in the {_xstate} state.");
800Debug.Assert(_xstate == XmlState.WithinComment, $"WriteCommentString cannot be called in the {_xstate} state.");
809Debug.Assert(_xstate == XmlState.WithinComment, $"WriteEndComment cannot be called in the {_xstate} state.");
843Debug.Assert(_xstate == XmlState.WithinPI, $"WriteProcessingInstructionString cannot be called in the {_xstate} state.");
852Debug.Assert(_xstate == XmlState.WithinPI, $"WriteEndProcessingInstruction cannot be called in the {_xstate} state.");
1205Debug.Assert(_xstate == XmlState.WithinContent, $"EndCopy cannot be called in the {_xstate} state.");
System.Reflection.Metadata (2)
System.Resources.Extensions (3)
System.Resources.Writer (1)
System.Runtime.Caching (1)
System.Runtime.Numerics (2)
System.Security.Cryptography (20)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (1)
244Debug.Assert(
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
86Debug.Assert(
System\Security\Cryptography\X509Certificates\UnixChainVerifier.cs (1)
38Debug.Assert(
System.Security.Cryptography.Pkcs (5)
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
86Debug.Assert(
System.Text.Encoding.CodePages (16)
System.Text.Json (25)
System\Text\Json\BitStack.cs (7)
80Debug.Assert(index >= 0, $"Set - Negative - index: {index}, arrayLength: {_array.Length}");
83Debug.Assert(_array.Length <= int.MaxValue / 32 + 1, $"index: {index}, arrayLength: {_array.Length}");
92Debug.Assert(index >= 0 && index > (int)((uint)_array.Length * 32 - 1), $"Only grow when necessary - index: {index}, arrayLength: {_array.Length}");
96Debug.Assert(elementIndex < _array.Length, $"Set - index: {index}, elementIndex: {elementIndex}, arrayLength: {_array.Length}, extraBits: {extraBits}");
145Debug.Assert(index >= 0, $"Get - Negative - index: {index}, arrayLength: {_array.Length}");
149Debug.Assert(elementIndex < _array.Length, $"Get - index: {index}, elementIndex: {elementIndex}, arrayLength: {_array.Length}, extraBits: {extraBits}");
165Debug.Assert(_array.Length < int.MaxValue / 2, $"Array too large - arrayLength: {_array.Length}");
System.Text.RegularExpressions (67)
System\Text\RegularExpressions\RegexCompiler.cs (41)
1648Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}");
1649Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
1853Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}");
2028Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}");
2029Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}");
2187Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
2188Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}");
2387Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}");
2388Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2513Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}");
2514Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2564Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
2565Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2829Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
2830Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional ? node.ChildCount() >= 1 : node.ChildCount() == 1, $"Unexpected number of children: {node.ChildCount()}");
2871Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}");
2891Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}");
2892Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
2962Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
3037Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected type: {node.Kind}");
3097Debug.Assert(node.Kind is RegexNodeKind.Beginning or RegexNodeKind.Start or RegexNodeKind.Bol or RegexNodeKind.End or RegexNodeKind.EndZ or RegexNodeKind.Eol, $"Unexpected type: {node.Kind}");
3235Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}");
3287Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}");
3503Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}");
3850Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
3851Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
3852Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
3853Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4212Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
4361Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
4608Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
4697Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4698Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4699Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}");
4700Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4701Debug.Assert(!analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.Kind}");
4735Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4736Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4737Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
4738Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
6161Debug.Assert(chars.Length > 3, $"chars.Length == {chars.Length}");
System\Text\RegularExpressions\RegexNode.cs (12)
256Debug.Assert(child.Parent == node, $"{child.Describe()} missing reference to parent {node.Describe()}");
298Debug.Assert(childCount == 0, $"Expected zero children for {node.Kind}, got {childCount}.");
307Debug.Assert(childCount == 1, $"Expected one and only one child for {node.Kind}, got {childCount}.");
311Debug.Assert(childCount == 2, $"Expected two children for {node.Kind}, got {childCount}");
315Debug.Assert(childCount == 3, $"Expected three children for {node.Kind}, got {childCount}");
320Debug.Assert(childCount >= 2, $"Expected at least two children for {node.Kind}, got {childCount}.");
333Debug.Assert(node.Str.Length >= 2, $"Expected {node.Str} to be at least two characters");
340Debug.Assert(!string.IsNullOrEmpty(node.Str), $"Expected non-null, non-empty string for {node.Kind}.");
344Debug.Assert(node.Str is null, $"Expected null string for {node.Kind}, got \"{node.Str}\".");
355Debug.Assert((node.Options & RegexOptions.IgnoreCase) == 0, $"{node.Kind} node should not have RegexOptions.IgnoreCase");
2842Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
2943Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
System.Threading.Channels (1)
System.Threading.Tasks.Parallel (2)
System.Windows.Forms (56)
System.Windows.Forms.Design (35)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Primitives (2)
Test.Utilities (1)