310 references to Equal
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (36)
CommandLineTests.cs (36)
461AssertEx.Equal(new[] { "System.dll" }, cmd.Arguments.MetadataReferences.Select(r => r.Reference));
462AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "a.cs"), Path.Combine(WorkingDirectory, "b.cs") }, cmd.Arguments.SourceFiles.Select(file => file.Path));
514AssertEx.Equal(new[] { "first.cs", "second.cs", "b.cs", "a.cs", "c.cs", "d.cs", "last.cs" }.Select(prependBasePath), resolvedSourceFiles);
516AssertEx.Equal(new[] { RuntimeEnvironment.GetRuntimeDirectory() }.Concat(new[] { @"x", @"..\goo", @"../bar", @"a b" }.Select(prependBasePath)), args.ReferencePaths.ToArray());
1182AssertEx.Equal(new[] { "a", "b", "c" },
1189AssertEx.Equal(new[] { " b " },
1225AssertEx.Equal(new[] { "{DIR}\\a.cs", "{DIR}\\b.cs", "{DIR}\\d2\\e.cs" },
1230AssertEx.Equal(new[] { "{DIR}\\a.cs", "{DIR}\\b.cs" },
1260AssertEx.Equal(new[] { "a", "b", "c" },
1267AssertEx.Equal(new[] { " b " },
2322AssertEx.Equal(
2328AssertEx.Equal(
2334AssertEx.Equal(
2340AssertEx.Equal(
2346AssertEx.Equal(
2352AssertEx.Equal(
5329AssertEx.Equal(new[] { "Goo.Bar" }, parsedArgs.CompilationOptions.Usings.AsEnumerable());
5333AssertEx.Equal(new[] { "Goo.Bar", "Baz", "System.Core", "System" }, parsedArgs.CompilationOptions.Usings.AsEnumerable());
5337AssertEx.Equal(new[] { "Goo", "Bar" }, parsedArgs.CompilationOptions.Usings.AsEnumerable());
5439AssertEx.Equal(
5443AssertEx.Equal(expectedOptions, actualOrdered.Select(entry => entry.Value));
6625AssertEx.Equal(new[] { "a.cs", "b.cs", @"c.cs e.cs", "hello", "world" }, args);
6638AssertEx.Equal(new[] { "a.cs", "b#.cs", "c#d.cs", "#f.cs", "#g.cs #h.cs" }, args);
6645AssertEx.Equal(new[] { @"a\b\c", @"d\\e\\f\\", @"\\\g\\\h\\\i", @"\\\\", @"\\\\\k\\\\\" }, args);
6652AssertEx.Equal(new[] { @"a\""a", @"b\\""b c\\\""c d\\\\""d", @"e\\\\\""e", @"f"" g""" }, args);
6659AssertEx.Equal(new[] { @"/o:""goo.cs""", @"/o:""abc def""\baz", @"""/o:baz bar""bing" }, args);
6670AssertEx.Equal(new[] { @"d:\abc def\baz.cs", @"c:\abc de.cs" }, args.SourceFiles.Select(file => file.Path));
11439AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11443AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path));
11447AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path));
11451AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11455AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11459AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11464AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11469AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11474AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "--") }, args.SourceFiles.Select(f => f.Path));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Interactive\BraceMatching\InteractiveBraceHighlightingTests.cs (4)
173AssertEx.Equal(Enumerable(new Span(62, 1), new Span(71, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
185AssertEx.Equal(Enumerable(new Span(62, 1), new Span(71, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
189AssertEx.Equal(Enumerable(new Span(82, 1), new Span(138, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
201AssertEx.Equal(Enumerable(new Span(82, 1), new Span(138, 1)), result.Select(ts => ts.Span.Span).OrderBy(s => s.Start));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (45)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (10)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (26)
Semantics\PrimaryConstructorTests.cs (5)
22075AssertEx.Equal(new[] { "<x>P", "<y>P" }, c1.GetMembers().OfType<FieldSymbol>().Select(f => f.Name));
22096AssertEx.Equal(new[] { "<x>P", "<y>P", "a" }, c1.GetMembers().OfType<FieldSymbol>().Select(f => f.Name));
22122AssertEx.Equal(new[] { "b", "<x>P", "<y>P", "a" }, c1.GetMembers().OfType<FieldSymbol>().Select(f => f.Name));
22148AssertEx.Equal(new[] { "<x>P", "<y>P", "a", "b" }, c1.GetMembers().OfType<FieldSymbol>().Select(f => f.Name));
22179AssertEx.Equal(new[] { "b", "<x>P", "<y>P", "a", "c" }, c1.GetMembers().OfType<FieldSymbol>().Select(f => f.Name));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (5)
ScriptTests.cs (3)
399AssertEx.Equal(new[] { "a", "b", "a", "x", "X" }, state.Variables.Select(v => v.Name));
400AssertEx.Equal(new object[] { '1', 2u, 3m, 5m, 20 }, state.Variables.Select(v => v.Value));
401AssertEx.Equal(new Type[] { typeof(char), typeof(uint), typeof(decimal), typeof(decimal), typeof(int) }, state.Variables.Select(v => v.Type));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (43)
Semantics\NullableReferenceTypesTests.cs (30)
30179AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableContextAttribute(1)", "System.Runtime.CompilerServices.NullableAttribute(0)" }, copenAttributes);
30186AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.MaybeNullAttribute" }, propertyAttributes);
30201AssertEx.Equal(new[] { "System.Runtime.CompilerServices.CompilerGeneratedAttribute" }, getterAttributes);
30212AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.MaybeNullAttribute" }, getterReturnAttributes);
30223AssertEx.Equal(new[] { "System.Runtime.CompilerServices.CompilerGeneratedAttribute" }, setterAttributes.Select(a => a.ToString()));
30282AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableContextAttribute(1)", "System.Runtime.CompilerServices.NullableAttribute(0)" }, copenAttributes);
30289AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.MaybeNullAttribute", "System.Diagnostics.CodeAnalysis.NotNullAttribute" }, propertyAttributes);
30304AssertEx.Equal(new[] { "System.Runtime.CompilerServices.CompilerGeneratedAttribute" }, getterAttributes);
30315AssertEx.Equal(new[] {
30802AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.MaybeNullAttribute" }, fieldAttributes);
30806AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableAttribute(1)", "System.Diagnostics.CodeAnalysis.MaybeNullAttribute" }, fieldAttributes);
40789AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.AllowNullAttribute" }, fieldAttributes);
40793AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableAttribute(1)", "System.Diagnostics.CodeAnalysis.AllowNullAttribute" }, fieldAttributes);
40967AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableContextAttribute(1)", "System.Runtime.CompilerServices.NullableAttribute(0)", "System.Reflection.DefaultMemberAttribute(\"Item\")" }, copenAttributes);
40974AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.AllowNullAttribute" }, propertyAttributes);
40993AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.AllowNullAttribute" }, setterValueAttributes);
41028AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableContextAttribute(1)", "System.Runtime.CompilerServices.NullableAttribute(0)", "System.Reflection.DefaultMemberAttribute(\"Item\")" }, copenAttributes);
41035AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.AllowNullAttribute", "System.Diagnostics.CodeAnalysis.DisallowNullAttribute" }, propertyAttributes);
41054AssertEx.Equal(new[] {
44648AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableContextAttribute(1)", "System.Runtime.CompilerServices.NullableAttribute(0)" }, copenAttributes);
44655AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.DisallowNullAttribute" }, propertyAttributes);
44670AssertEx.Equal(new[] { "System.Runtime.CompilerServices.CompilerGeneratedAttribute" }, setterAttributes);
44681AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.DisallowNullAttribute" }, setterValueAttributes);
44893AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.DisallowNullAttribute" }, fieldAttributes);
44897AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableAttribute(1)", "System.Diagnostics.CodeAnalysis.DisallowNullAttribute" }, fieldAttributes);
47985AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableContextAttribute(1)", "System.Runtime.CompilerServices.NullableAttribute(0)", "System.Reflection.DefaultMemberAttribute(\"Item\")" }, copenAttributes);
47992AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.NotNullAttribute" }, propertyAttributes);
48009AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.NotNullAttribute" }, getterReturnAttributes);
48093AssertEx.Equal(new[] { "System.Diagnostics.CodeAnalysis.NotNullAttribute" }, fieldAttributes);
48097AssertEx.Equal(new[] { "System.Runtime.CompilerServices.NullableAttribute(1)", "System.Diagnostics.CodeAnalysis.NotNullAttribute" }, fieldAttributes);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\CompilationAPITests.cs (5)
3039AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, type.TypeArgumentNullableAnnotations());
3047AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated }, type.TypeArgumentNullableAnnotations());
3074AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, type.TypeArgumentNullableAnnotations());
3082AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.NotAnnotated }, type.TypeArgumentNullableAnnotations());
3613AssertEx.Equal(types.Select(t => t.ToTestDisplayString()), new[] { "C", "C", "C" });
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.Features.UnitTests (12)
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (3)
Microsoft.CodeAnalysis.Test.Utilities (31)
Compilation\TestOperationVisitor.cs (27)
144AssertEx.Equal(children, operation.ChildOperations);
158AssertEx.Equal(children, operation.ChildOperations);
166AssertEx.Equal(new[] { operation.Value }.Concat(operation.Cases), operation.ChildOperations);
173AssertEx.Equal(operation.Clauses.Concat(operation.Body), operation.ChildOperations);
286AssertEx.Equal(children, operation.ChildOperations);
306AssertEx.Equal(children, operation.ChildOperations);
327AssertEx.Equal(children, operation.ChildOperations);
336AssertEx.Equal(children, operation.ChildOperations);
437AssertEx.Equal(children, operation.ChildOperations);
458AssertEx.Equal(children, operation.ChildOperations);
552AssertEx.Equal(children, operation.ChildOperations);
574AssertEx.Equal(children, operation.ChildOperations);
602AssertEx.Equal(new[] { operation.ArrayReference }.Concat(operation.Indices), operation.ChildOperations);
677AssertEx.Equal(children, operation.ChildOperations);
1043AssertEx.Equal(children, operation.ChildOperations);
1070AssertEx.Equal(children, operation.ChildOperations);
1076AssertEx.Equal(new[] { operation.Operation }.Concat(operation.Arguments), operation.ChildOperations);
1082AssertEx.Equal(new[] { operation.Operation }.Concat(operation.Arguments), operation.ChildOperations);
1147AssertEx.Equal(children, operation.ChildOperations);
1316AssertEx.Equal(children, operation.ChildOperations);
1323AssertEx.Equal(children, operation.ChildOperations);
1475AssertEx.Equal(children, operation.ChildOperations);
1519AssertEx.Equal(children, operation.ChildOperations);
1555AssertEx.Equal(children, operation.ChildOperations);
1621AssertEx.Equal(new IOperation[] { operation.EventReference }.Concat(operation.Arguments), operation.ChildOperations);
1793AssertEx.Equal(SpecializedCollections.SingletonEnumerable(operation.Operand).Concat(operation.DimensionSizes), operation.ChildOperations);
1822AssertEx.Equal(children, operation.ChildOperations);
Microsoft.CodeAnalysis.UnitTests (18)
Collections\ArrayBuilderTests.cs (6)
22AssertEx.Equal([6, 5, 1, 2, 3, 2, 4, 5, 1, 7], builder);
25AssertEx.Equal([5, 1, 2, 3, 2, 4, 5, 1, 7], builder);
28AssertEx.Equal([5, 1, 2, 3, 2, 4, 5, 1], builder);
31AssertEx.Equal([5, 3, 4, 5], builder);
34AssertEx.Equal([], builder);
37AssertEx.Equal([], builder);
EmbeddedTextTests.cs (11)
123AssertEx.Equal(new byte[] { 0, 0, 0, 0 }, text.Blob.Take(4));
124AssertEx.Equal(bytes, text.Blob.Skip(4));
138AssertEx.Equal(new byte[] { 0, 0, 0, 0 }, text.Blob.Take(4));
139AssertEx.Equal(bytes, text.Blob.Skip(4));
151AssertEx.Equal(new byte[] { 0, 0, 0, 0 }, text.Blob.Take(4));
152AssertEx.Equal(Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(SmallSource)), text.Blob.Skip(4));
165AssertEx.Equal(BitConverter.GetBytes(bytes.Length), text.Blob.Take(4));
180AssertEx.Equal(BitConverter.GetBytes(bytes.Length), text.Blob.Take(4));
193AssertEx.Equal(BitConverter.GetBytes(Encoding.Unicode.GetPreamble().Length + LargeSource.Length * sizeof(char)), text.Blob.Take(4));
194AssertEx.Equal(Encoding.Unicode.GetPreamble().Concat(Encoding.Unicode.GetBytes(LargeSource)), Decompress(text.Blob.Skip(4)));
244AssertEx.Equal(BitConverter.GetBytes(bytes.Length), text.Blob.Take(4));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (9)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
SolutionTests\SolutionTests.cs (15)
1984AssertEx.Equal((ProjectReference[])[projectRef2], solution3.GetProject(projectId)!.ProjectReferences);
1985AssertEx.Equal((ProjectReference[])[projectRef2, externalProjectRef], solution3.GetProject(projectId)!.AllProjectReferences);
2017AssertEx.Equal((ProjectReference[])[projectRef2], solution2.GetProject(projectId)!.AllProjectReferences);
2021AssertEx.Equal((ProjectReference[])[externalProjectRef], solution3.GetProject(projectId)!.AllProjectReferences);
2104AssertEx.Equal((MetadataReference[])[metadataRef1, metadataRef2], solution3.GetProject(projectId)!.MetadataReferences);
2127AssertEx.Equal((MetadataReference[])[metadataRef2], solution2.GetProject(projectId)!.MetadataReferences);
2174AssertEx.Equal((AnalyzerReference[])[analyzerRef1, analyzerRef2], solution3.GetProject(projectId)!.AnalyzerReferences);
2200AssertEx.Equal((AnalyzerReference[])[analyzerRef2], solution2.GetProject(projectId)!.AnalyzerReferences);
2242AssertEx.Equal((AnalyzerReference[])[analyzerRef1, analyzerRef2], solution3.AnalyzerReferences);
2266AssertEx.Equal((AnalyzerReference[])[analyzerRef2], solution2.AnalyzerReferences);
2372AssertEx.Equal(folders, document.Folders);
2402AssertEx.Equal(folders, document.Folders);
2430AssertEx.Equal(folders, document.Folders);
2482AssertEx.Equal(folders, document2.Folders);
2521AssertEx.Equal(folders, document2.Folders);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
Roslyn.Test.PdbUtilities (1)
Roslyn.VisualStudio.Next.UnitTests (2)
SemanticSearch.BuildTask.UnitTests (1)