192 references to Equal
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (5)
CscTests.cs (4)
222AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 231AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 241AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4;NS5.NS6;NS7.NS8" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 561AssertEx.Equal("/reportivts", csc.GenerateResponseFileContents());
VbcTests.cs (1)
528AssertEx.Equal("/optionstrict:custom /reportivts", vbc.GenerateResponseFileContents());
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
226AssertEx.Equal("Class1.cs(1,1): warning ID1000:", output.Trim()); 249AssertEx.Equal("", outWriter.ToString()); 3680AssertEx.Equal(""" 3703AssertEx.Equal("""
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
DecompiledSource\DecompiledSourceFormattingTests.cs (1)
261AssertEx.Equal(expected, test.ToString());
Formatting\RazorLineFormattingOptionsTests.cs (1)
76AssertEx.Equal(@"
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (2)
74AssertEx.Equal(expectedTree!.Replace("\"", "\"\""), actualTree); 82AssertEx.Equal(RemoveMessagesInNonSupportedLanguage(expectedDiagnostics).Replace("\"", "\"\""), actualDiagnostics);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
236AssertEx.Equal(expectedValue, attributeData);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (47)
Attributes\AttributeTests_Assembly.cs (11)
2299AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs[0].ToString()); 2300AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)", attrs[1].ToString()); 2301AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs[2].ToString()); 2302AssertEx.Equal("A1(1)", attrs[3].ToString()); 2355AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs[0].ToString()); 2356AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)", attrs[1].ToString()); 2357AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs[2].ToString()); 2358AssertEx.Equal("A1(typeof(C1))", attrs[3].ToString()); 2383AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs[0].ToString()); 2384AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)", attrs[1].ToString()); 2385AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs[2].ToString());
FirstClassSpanTests.cs (20)
8549AssertEx.Equal("C.M1<System.Int32>", DisplayInvokedMethodTypeArguments(comp)); 8581AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8613AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8628AssertEx.Equal("C.M1<System.Int32>", DisplayInvokedMethodTypeArguments(comp)); 8660AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8692AssertEx.Equal("C.M1<System.Int32>", DisplayInvokedMethodTypeArguments(comp)); 8707AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8722AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8754AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8773AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp, CandidateReason.OverloadResolutionFailure)); 8792AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp, CandidateReason.OverloadResolutionFailure)); 8825AssertEx.Equal("C.M1<System.Int32>", DisplayInvokedMethodTypeArguments(comp)); 8840AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8855AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8870AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8919AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8951AssertEx.Equal("C.M1<System.Int32>", DisplayInvokedMethodTypeArguments(comp)); 8966AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 8981AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp)); 9013AssertEx.Equal("C.M1<System.Object>", DisplayInvokedMethodTypeArguments(comp));
RefStructInterfacesTests.cs (8)
4383AssertEx.Equal("C<T> where T : allows ref struct", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 5099AssertEx.Equal("C<T> where T : new(), allows ref struct", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 5123AssertEx.Equal("C<T> where T : new(), allows ref struct", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 5770AssertEx.Equal("C<T>", t.ContainingSymbol.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 14966AssertEx.Equal("new S()", foreachSyntax.Expression.ToString()); 18183AssertEx.Equal("new S()", foreachSyntax.Expression.ToString()); 21306AssertEx.Equal("x = default", declarator.ToString()); 28946AssertEx.Equal("void ITest29.M21<T1>() where T1 : allows ref struct", m21.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints));
Semantics\ParamsCollectionTests.cs (8)
10404AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10405AssertEx.Equal("System.ParamArrayAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString()); 10418AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10419AssertEx.Equal("System.ParamArrayAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString()); 10769AssertEx.Equal("System.ParamArrayAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10770AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString()); 10783AssertEx.Equal("System.ParamArrayAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10784AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString());
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
SemanticSearch\CSharpSemanticSearchServiceTests.cs (2)
181AssertEx.Equal($"CSharpAssembly1: [179..179) 'F(x + 1);': InsufficientExecutionStackException: '{expectedMessage}'", Inspect(exception, query)); 239AssertEx.Equal($"CSharpAssembly1: [190..190) 'var x = s.ToString();': NullReferenceException: '{expectedMessage}'", Inspect(exception, query));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\DynamicTests.cs (18)
4986AssertEx.Equal(@"i1.Test(""name"", value)", call.ToString()); 5110AssertEx.Equal(@"i1.Test(""name"", value)", call.ToString()); 5233AssertEx.Equal(@"i1.Test(""name"", value)", call.ToString()); 5347AssertEx.Equal(@"new C().Test(""name"", d)", call.ToString()); 5388AssertEx.Equal(@"Test(name: ""name"", d)", call.ToString()); 5432AssertEx.Equal(@"Test(&name, d)", call.ToString()); 5476AssertEx.Equal(@"Test(""name"", d)", call.ToString()); 5520AssertEx.Equal(@"Test(""name"", d)", call.ToString()); 5697AssertEx.Equal(@"i1(""name"", value)", call.ToString()); 5738AssertEx.Equal(@"Test(name: ""name"", d)", call.ToString()); 5783AssertEx.Equal(@"Test(&name, d)", call.ToString()); 5828AssertEx.Equal(@"Test(""name"", d)", call.ToString()); 5873AssertEx.Equal(@"Test(""name"", d)", call.ToString()); 11327AssertEx.Equal(@"i1.Test(""name"", value)", call.ToString()); 11380AssertEx.Equal(@"i1.Test(""name"", value)", call.ToString()); 11456AssertEx.Equal(@"Test(""name"", d)", call.ToString()); 11500AssertEx.Equal(@"i1(""name"", value)", call.ToString()); 11541AssertEx.Equal(@"Test(""name"", d)", call.ToString());
Semantics\FunctionPointerTests.cs (1)
2089AssertEx.Equal("ptr = M(C.Field)", localSyntax.ToString());
Semantics\InterceptorsTests.cs (5)
6880AssertEx.Equal("xRCCFCvTOZMORzSr/fZQFlIAAABQcm9ncmFtLmNz", locationSpecifier.Data); 6881AssertEx.Equal("""[global::System.Runtime.CompilerServices.InterceptsLocationAttribute(1, "xRCCFCvTOZMORzSr/fZQFlIAAABQcm9ncmFtLmNz")]""", locationSpecifier.GetInterceptsLocationAttributeSyntax()); 6889AssertEx.Equal("xRCCFCvTOZMORzSr/fZQFmAAAABQcm9ncmFtLmNz", otherLocation.Data); 6890AssertEx.Equal("""[global::System.Runtime.CompilerServices.InterceptsLocationAttribute(1, "xRCCFCvTOZMORzSr/fZQFmAAAABQcm9ncmFtLmNz")]""", otherLocation.GetInterceptsLocationAttributeSyntax()); 7200AssertEx.Equal("""[global::System.Runtime.CompilerServices.InterceptsLocationAttribute(1, "jB4qgCy292LkEGCwmD+R6FIAAAA=")]""", locationSpecifier.GetInterceptsLocationAttributeSyntax());
Semantics\OperatorTests.cs (1)
3217AssertEx.Equal(expected, results);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (53)
Compilation\CompilationAPITests.cs (6)
2745AssertEx.Equal(display, result); 2763AssertEx.Equal(display, result); 2782AssertEx.Equal("int.operator +(int, int)", result); 2941AssertEx.Equal(display, result); 2953AssertEx.Equal(display, result); 2972AssertEx.Equal("int.operator +(int)", result);
DocumentationComments\DocumentationCommentCompilerTests.cs (31)
990AssertEx.Equal(expected, actualA); 1040AssertEx.Equal(expected, actualA); 1091AssertEx.Equal(expected, actualA); 1145AssertEx.Equal(expected, actualA); 1193AssertEx.Equal(expected, actualA); 1249AssertEx.Equal(expected, actualA); 1312AssertEx.Equal(expected, actual); 1375AssertEx.Equal(expected, actual); 1438AssertEx.Equal(expected, actual); 1495AssertEx.Equal(expected, actual); 1577AssertEx.Equal(expected, actualA); 1628AssertEx.Equal(expected, actualA); 1716AssertEx.Equal(expected, actualA); 1768AssertEx.Equal(expected, actualA); 1823AssertEx.Equal(expected, actualA); 1872AssertEx.Equal(expected, actualA); 1929AssertEx.Equal(expected, actualA); 1993AssertEx.Equal(expected, actual); 2057AssertEx.Equal(expected, actual); 2121AssertEx.Equal(expected, actual); 2179AssertEx.Equal(expected, actual); 7658AssertEx.Equal(expected, actual); 7687AssertEx.Equal(expected, actual); 7735AssertEx.Equal(expected, actual); 7779AssertEx.Equal(expected, actual); 7819AssertEx.Equal(expected, actual); 7856AssertEx.Equal(expected, actual); 7887AssertEx.Equal(expected, actual); 7931AssertEx.Equal(expected, actual); 7975AssertEx.Equal(expected, actual); 8022AssertEx.Equal(expected, actual);
SymbolDisplay\SymbolDisplayTests.cs (1)
3457AssertEx.Equal(expectedText, actualParts.ToDisplayString());
Symbols\RequiredMembersTests.cs (2)
6199AssertEx.Equal(expectedReason, (string)attrArgs[0].ValueInternal!); 6245AssertEx.Equal(expectedReason, (string)attrArgs[0].ValueInternal!);
Symbols\Source\CustomModifierCopyTests.cs (10)
1011AssertEx.Equal("(object a, object b) I.M((object c, object d) x)", 1021AssertEx.Equal("(object a, object b) C.M((object c, object d) x)", 1067AssertEx.Equal("(object, object) C.M((object c, object d) x)", classMethod3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1084AssertEx.Equal("(object a, object b) C.M((object c, object d) x)", classMethod4.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1140AssertEx.Equal("(object a, object b) I.P", interfaceProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1146AssertEx.Equal("(object a, object b) C.P", classProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1287AssertEx.Equal("(object a, object b) Base.M((object c, object d) x)", 1307AssertEx.Equal("(object a, object b) C.M((object c, object d) y)", classMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1335AssertEx.Equal("(object, object) C.M((object c, object d) y)", classMethod2.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1357AssertEx.Equal("(object a, object b) C.M((object, object) y)", classMethod3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Symbols\Source\NullablePublicAPITests.cs (2)
5053AssertEx.Equal("_ = s", assignmentsInLambda[0].ToString()); 5054AssertEx.Equal("_ = s", assignmentsInLambda[2].ToString());
Symbols\Source\UsingAliasTests.cs (1)
276AssertEx.Equal(expected, usingAliasType.ToDisplayString(SymbolDisplayFormat.TestFormat));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
IncrementalParsing\IncrementalParsingTests.cs (2)
2820AssertEx.Equal(@"System.Console.WriteLine(true) 2848AssertEx.Equal(@"if (false)
LexicalAndXml\SyntaxTokenParserTests.cs (1)
411AssertEx.Equal(expectedText.NormalizeLineEndings(), result.Token.ToFullString());
Syntax\SyntaxNormalizerTests.cs (1)
3411AssertEx.Equal(expected.NormalizeLineEndings(), actual.NormalizeLineEndings());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
FunctionPointerUtilities.cs (4)
145AssertEx.Equal(expectedSyntax, syntax.ToString()); 157AssertEx.Equal(expectedType, semanticInfo.Type.ToTestDisplayString(includeNonNullable: false)); 166AssertEx.Equal(expectedConvertedType, semanticInfo.ConvertedType.ToTestDisplayString(includeNonNullable: false)); 219AssertEx.Equal(expectedSymbol, semanticInfo.Symbol.ToTestDisplayString(includeNonNullable: false));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (1)
52AssertEx.Equal(expectedText, normalized);
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (1)
65AssertEx.Equal(expected, actual);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
DocumentationComments\AbstractDocumentationCommentTests.cs (1)
165AssertEx.Equal(expectedCode, actual);
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
136AssertEx.Equal(expectedWithoutWhitespace, actualWithoutWhitespace);
SpellCheck\AbstractSpellCheckFixerProviderTests.cs (1)
54AssertEx.Equal(expected, buffer.CurrentSnapshot.GetText());
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
220AssertEx.Equal($"[{projectId}] Error ENC1001: test.cs(0, 1, 0, 2): {string.Format(FeaturesResources.ErrorReadingFile, "doc", "syntax error")}", Inspect(results.SyntaxError!));
Microsoft.CodeAnalysis.UnitTests (13)
Analyzers\AnalyzerFileReferenceTests.cs (2)
327AssertEx.Equal($""" 356AssertEx.Equal($"""
FileSystem\PathUtilitiesTests.cs (3)
436AssertEx.Equal(output, PathUtilities.CollapseWithForwardSlash(input.AsSpan())); 448AssertEx.Equal(output, PathUtilities.NormalizeDriveLetter(input)); 460AssertEx.Equal(input, PathUtilities.NormalizeDriveLetter(input));
MetadataReferences\AssemblyIdentityTests.cs (1)
350AssertEx.Equal(null, an.CodeBase);
Symbols\SpecialTypeTests.cs (7)
15AssertEx.Equal("0", ((ExtendedSpecialType)SpecialType.None).ToString()); 16AssertEx.Equal("System_Object", ((ExtendedSpecialType)1).ToString()); 17AssertEx.Equal("System_Runtime_CompilerServices_InlineArrayAttribute", ((ExtendedSpecialType)SpecialType.Count).ToString()); 18AssertEx.Equal("System_ReadOnlySpan_T", ((ExtendedSpecialType)InternalSpecialType.First).ToString()); 19AssertEx.Equal("System_ReadOnlySpan_T", ((ExtendedSpecialType)InternalSpecialType.System_ReadOnlySpan_T).ToString()); 20AssertEx.Equal("System_Reflection_MethodInfo", ((ExtendedSpecialType)(InternalSpecialType.NextAvailable - 1)).ToString()); 21AssertEx.Equal("52", ((ExtendedSpecialType)InternalSpecialType.NextAvailable).ToString());
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (11)
Attributes\AssemblyAttributes.vb (11)
2275AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs(0).ToString()) 2276AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows:=True)", attrs(1).ToString()) 2277AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs(2).ToString()) 2278AssertEx.Equal("A1(1)", attrs(3).ToString()) 2346AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs(0).ToString()) 2347AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows:=True)", attrs(1).ToString()) 2348AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs(2).ToString()) 2349AssertEx.Equal("A1(GetType(C1))", attrs(3).ToString()) 2381AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs(0).ToString()) 2382AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows:=True)", attrs(1).ToString()) 2383AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs(2).ToString())
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (8)
Compilation\CompilationAPITests.vb (8)
1749AssertEx.Equal(display, result) 1765AssertEx.Equal(display, result) 1774AssertEx.Equal("Public Shared Operator &(left As String, right As String) As String", result) 1784AssertEx.Equal("Public Shared Operator Like(left As String, right As String) As Boolean", result) 1795AssertEx.Equal(display, result) 1811AssertEx.Equal("Public Shared Operator +(left As Integer, right As Integer) As Integer", result) 1854AssertEx.Equal(display, result) 1898AssertEx.Equal("Public Shared Operator +(value As Integer) As Integer", result)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolDisplay\SymbolDisplayTests.vb (1)
6105AssertEx.Equal(expectedText, parts.ToDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
45AssertEx.Equal(fixedExpectations, normalized)
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
Formatter\FormatterTests.cs (3)
59AssertEx.Equal(@"Formatted with options: LineFormattingOptions { UseTabs = False, TabSize = 4, IndentationSize = 4, NewLine = \r\n }", formattedText.ToString()); 100AssertEx.Equal(@"Formatted with options: LineFormattingOptions { UseTabs = True, TabSize = 5, IndentationSize = 6, NewLine = \r }", formattedText.ToString()); 105AssertEx.Equal(@"Formatted with options: LineFormattingOptions { UseTabs = False, TabSize = 1, IndentationSize = 7, NewLine = \n }", formattedText.ToString());