2471 references to Equal
Aspire.Dashboard.Tests (2)
Aspire.Hosting.Dapr.Tests (1)
Aspire.Hosting.Garnet.Tests (3)
Aspire.Hosting.Redis.Tests (3)
Aspire.Hosting.Valkey.Tests (3)
IIS.FunctionalTests (1)
InMemory.FunctionalTests (1)
Microsoft.AspNetCore.Authentication.Test (1)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Forms.Tests (15)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (10)
Microsoft.AspNetCore.Components.Web.Tests (2)
Microsoft.AspNetCore.Cors.Test (10)
CorsMiddlewareTests.cs (10)
205Assert.Equal(new[] { "Header1" }, kvp.Value);
210Assert.Equal(new[] { "PUT" }, kvp.Value);
215Assert.Equal(new[] { OriginUrl }, kvp.Value);
271Assert.Equal(new[] { "true" }, kvp.Value);
276Assert.Equal(new[] { "X-Test1,X-Test2" }, kvp.Value);
281Assert.Equal(new[] { "PUT" }, kvp.Value);
286Assert.Equal(new[] { OriginUrl }, kvp.Value);
492Assert.Equal(new[] { "Header1" }, kvp.Value);
497Assert.Equal(new[] { "PUT" }, kvp.Value);
502Assert.Equal(new[] { OriginUrl }, kvp.Value);
Microsoft.AspNetCore.DataProtection.Tests (15)
KeyManagement\KeyRingProviderTests.cs (11)
52Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
95Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "ResolveDefaultKeyPolicy" }, callSequence);
145Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
186Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
234Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
268Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
318Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
356Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
394Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence);
569Assert.Equal(expectedCallSequence, actualCallSequence);
802Assert.Equal(current.Item2, allKeys);
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (1)
Microsoft.AspNetCore.HeaderPropagation.Tests (17)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Http.Results.Tests (13)
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.Localization.Tests (2)
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (27)
DefaultApiDescriptionProviderTest.cs (17)
708Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
722Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
729Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
825Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
832Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
881Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
895Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
902Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
951Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
965Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
972Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1021Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1028Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1035Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1042Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1149Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1169Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
Microsoft.AspNetCore.Mvc.Core.Test (58)
ControllerBaseTest.cs (32)
443Assert.Equal(expected, resultTemporary.RouteValues);
467Assert.Equal(expected, resultTemporary.RouteValues);
491Assert.Equal(expected, resultPermanent.RouteValues);
515Assert.Equal(expected, resultPermanent.RouteValues);
535Assert.Equal(expected, resultTemporary.RouteValues);
555Assert.Equal(expected, resultTemporary.RouteValues);
578Assert.Equal(expectedRouteValues, result.RouteValues);
603Assert.Equal(expectedRouteValues, result.RouteValues);
625Assert.Equal(expected, resultPermanent.RouteValues);
645Assert.Equal(expected, resultPermanent.RouteValues);
668Assert.Equal(expectedRouteValues, result.RouteValues);
697Assert.Equal(expectedRouteValues, result.RouteValues);
718Assert.Equal(expected, resultTemporary.RouteValues);
737Assert.Equal(expected, resultTemporary.RouteValues);
759Assert.Equal(expectedRouteValues, result.RouteValues);
782Assert.Equal(expectedRouteValues, result.RouteValues);
802Assert.Equal(expected, resultPermanent.RouteValues);
821Assert.Equal(expected, resultPermanent.RouteValues);
843Assert.Equal(expectedRouteValues, result.RouteValues);
866Assert.Equal(expectedRouteValues, result.RouteValues);
956Assert.Equal(expected, resultTemporary.RouteValues);
977Assert.Equal(expected, resultTemporary.RouteValues);
998Assert.Equal(expected, resultPermanent.RouteValues);
1243Assert.Equal(expected, resultPermanent.RouteValues);
1264Assert.Equal(expected, resultPermanent.RouteValues);
1285Assert.Equal(expected, resultPermanent.RouteValues);
1423Assert.Equal(expected, result.RouteValues);
1458Assert.Equal(expected, result.RouteValues);
1480Assert.Equal(expected, result.RouteValues);
1617Assert.Equal(expected, result.RouteValues);
1637Assert.Equal(expected, result.RouteValues);
1659Assert.Equal(expected, result.RouteValues);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (29)
ApiExplorerTest.cs (20)
537Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
559Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
581Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
793Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
799Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
828Assert.Equal(new[] { "text/plain" }, GetSortedMediaTypes(responseType));
834Assert.Equal(new[] { "application/json" }, GetSortedMediaTypes(responseType));
934Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1251Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1284Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1290Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1315Assert.Equal(expectedMediaTypes, actualMediaTypes);
1346Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1381Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1416Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1451Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1457Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1491Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1497Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
1528Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
Microsoft.AspNetCore.Mvc.IntegrationTests (7)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
Microsoft.AspNetCore.Mvc.Razor.Test (30)
RazorViewEngineTest.cs (19)
266Assert.Equal(new[]
288Assert.Equal(new[] {
688Assert.Equal(expectedSeeds, seeds);
700Assert.Equal(expander1Result, seeds);
756Assert.Equal(expectedSeeds, seeds);
768Assert.Equal(expander1Result, seeds);
983Assert.Equal(expandedLocations, result.SearchedLocations);
991Assert.Equal(expandedLocations, result.SearchedLocations);
1042Assert.Equal(expandedLocations, result.SearchedLocations);
1172Assert.Equal(expectedSeeds, seeds);
1231Assert.Equal(expectedSeeds, seeds);
1274Assert.Equal(expected, result.SearchedLocations);
1344Assert.Equal(expected, result.SearchedLocations);
1380Assert.Equal(expected, result.SearchedLocations);
1409Assert.Equal(expected, result.SearchedLocations);
1749Assert.Equal(expected, actual);
1774Assert.Equal(expected, actual);
1799Assert.Equal(expected, actual);
1826Assert.Equal(expected, actual);
Microsoft.AspNetCore.Mvc.RazorPages.Test (58)
PageModelTest.cs (26)
434Assert.Equal(expected, resultTemporary.RouteValues);
458Assert.Equal(expected, resultTemporary.RouteValues);
482Assert.Equal(expected, resultPermanent.RouteValues);
506Assert.Equal(expected, resultPermanent.RouteValues);
526Assert.Equal(expected, resultTemporary.RouteValues);
546Assert.Equal(expected, resultTemporary.RouteValues);
569Assert.Equal(expectedRouteValues, result.RouteValues);
594Assert.Equal(expectedRouteValues, result.RouteValues);
616Assert.Equal(expected, resultPermanent.RouteValues);
636Assert.Equal(expected, resultPermanent.RouteValues);
659Assert.Equal(expectedRouteValues, result.RouteValues);
688Assert.Equal(expectedRouteValues, result.RouteValues);
709Assert.Equal(expected, resultTemporary.RouteValues);
728Assert.Equal(expected, resultTemporary.RouteValues);
750Assert.Equal(expectedRouteValues, result.RouteValues);
773Assert.Equal(expectedRouteValues, result.RouteValues);
793Assert.Equal(expected, resultPermanent.RouteValues);
812Assert.Equal(expected, resultPermanent.RouteValues);
834Assert.Equal(expectedRouteValues, result.RouteValues);
857Assert.Equal(expectedRouteValues, result.RouteValues);
1263Assert.Equal(expected, resultPermanent.RouteValues);
1284Assert.Equal(expected, resultPermanent.RouteValues);
1305Assert.Equal(expected, resultTemporary.RouteValues);
1326Assert.Equal(expected, resultTemporary.RouteValues);
1347Assert.Equal(expected, resultPermanent.RouteValues);
1368Assert.Equal(expected, resultPermanent.RouteValues);
PageTest.cs (26)
454Assert.Equal(expected, resultTemporary.RouteValues);
478Assert.Equal(expected, resultTemporary.RouteValues);
502Assert.Equal(expected, resultPermanent.RouteValues);
526Assert.Equal(expected, resultPermanent.RouteValues);
546Assert.Equal(expected, resultTemporary.RouteValues);
566Assert.Equal(expected, resultTemporary.RouteValues);
589Assert.Equal(expectedRouteValues, result.RouteValues);
614Assert.Equal(expectedRouteValues, result.RouteValues);
636Assert.Equal(expected, resultPermanent.RouteValues);
656Assert.Equal(expected, resultPermanent.RouteValues);
679Assert.Equal(expectedRouteValues, result.RouteValues);
708Assert.Equal(expectedRouteValues, result.RouteValues);
729Assert.Equal(expected, resultTemporary.RouteValues);
748Assert.Equal(expected, resultTemporary.RouteValues);
770Assert.Equal(expectedRouteValues, result.RouteValues);
793Assert.Equal(expectedRouteValues, result.RouteValues);
813Assert.Equal(expected, resultPermanent.RouteValues);
832Assert.Equal(expected, resultPermanent.RouteValues);
854Assert.Equal(expectedRouteValues, result.RouteValues);
877Assert.Equal(expectedRouteValues, result.RouteValues);
967Assert.Equal(expected, resultTemporary.RouteValues);
988Assert.Equal(expected, resultTemporary.RouteValues);
1009Assert.Equal(expected, resultPermanent.RouteValues);
1030Assert.Equal(expected, resultPermanent.RouteValues);
1337Assert.Equal(expected, resultPermanent.RouteValues);
1358Assert.Equal(expected, resultPermanent.RouteValues);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (14)
SelectTagHelperTest.cs (10)
349Assert.Equal(savedDisabled, items.Select(item => item.Disabled));
350Assert.Equal(savedGroup, items.Select(item => item.Group));
351Assert.Equal(savedSelected, items.Select(item => item.Selected));
352Assert.Equal(savedText, items.Select(item => item.Text));
353Assert.Equal(savedValue, items.Select(item => item.Value));
529Assert.Equal(savedDisabled, items.Select(item => item.Disabled));
530Assert.Equal(savedGroup, items.Select(item => item.Group));
531Assert.Equal(savedSelected, items.Select(item => item.Selected));
532Assert.Equal(savedText, items.Select(item => item.Text));
533Assert.Equal(savedValue, items.Select(item => item.Value));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (85)
Buffers\PagedCharBufferTest.cs (16)
59Assert.Equal(new[] { 'a', 'b', 'c', 't' }, page.Take(4));
145Assert.Equal(new[] { 'a', 'b', 'c' }, page.Take(buffer.Length));
164page => Assert.Equal(expected, page),
165page => Assert.Equal(expected, page),
196page => Assert.Equal(expected1, page),
226page => Assert.Equal(expected, page),
255page => Assert.Equal(expected, page),
274Assert.Equal(new[] { 'a', 'b', 'c', 'd', 'e', 'f' }, page.Take(buffer.Length));
290Assert.Equal(new[] { 'b', 'c', 'd' }, page.Take(buffer.Length));
309page => Assert.Equal(expected, page),
310page => Assert.Equal(expected, page),
346page => Assert.Equal(expected1, page),
376page => Assert.Equal(expected, page),
405page => Assert.Equal(expected, page),
423Assert.Equal(new[] { 'A', 'b', 'c', 'd', 'e' }, page.Take(buffer.Length));
478Assert.Equal(new[] { 'e', 'f', 'g', 'h' }, buffer.Pages[0].Take(buffer.Length));
Buffers\ViewBufferTextWriterTest.cs (5)
75Assert.Equal(expected, GetValues(buffer));
101Assert.Equal(expected, GetValues(buffer));
118Assert.Equal<object>(new[] { newLine, newLine }, actual);
134Assert.Equal<object>(new[] { string.Empty }, actual);
157Assert.Equal<object>(new[] { input1, input2, newLine, input3, input4, newLine }, actual);
Rendering\HtmlHelperSelectTest.cs (40)
338Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
339Assert.Equal(savedGroup, selectList.Select(item => item.Group));
340Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
341Assert.Equal(savedText, selectList.Select(item => item.Text));
342Assert.Equal(savedValue, selectList.Select(item => item.Value));
362Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
402Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
611Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
635Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
659Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
684Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
712Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
735Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
759Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
760Assert.Equal(savedGroup, selectList.Select(item => item.Group));
761Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
762Assert.Equal(savedText, selectList.Select(item => item.Text));
763Assert.Equal(savedValue, selectList.Select(item => item.Value));
784Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
805Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1011Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1032Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1056Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1077Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1105Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
1106Assert.Equal(savedGroup, selectList.Select(item => item.Group));
1107Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1108Assert.Equal(savedText, selectList.Select(item => item.Text));
1109Assert.Equal(savedValue, selectList.Select(item => item.Value));
1133Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1153Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1173Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1198Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled));
1199Assert.Equal(savedGroup, selectList.Select(item => item.Group));
1200Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1201Assert.Equal(savedText, selectList.Select(item => item.Text));
1202Assert.Equal(savedValue, selectList.Select(item => item.Value));
1224Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1245Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
1267Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
ViewEngines\CompositeViewEngineTest.cs (6)
67Assert.Equal(new[] { "controller/test-view" }, result.SearchedLocations);
156Assert.Equal(new[] { "1", "2", "3", "4", "5" }, result.SearchedLocations);
199Assert.Equal(new[] { expectedViewName }, result.SearchedLocations);
297Assert.Equal(new[] { "1", "2", "3", "4", "5" }, result.SearchedLocations);
334Assert.Equal(new[] { "Shared/partial-view" }, result.SearchedLocations);
423Assert.Equal(new[] { "1", "2", "3", "4", "5" }, result.SearchedLocations);
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Microsoft.AspNetCore.Razor.Test (1)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.Shared.Tests (4)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.Build.BuildCheck.UnitTests (3)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (61)
CodeGen\CodeGenLocalFunctionTests.cs (13)
5237Assert.Equal(
5286Assert.Equal(
5327Assert.Equal(
5540Assert.Equal(new[] { "CompilerGeneratedAttribute", "ConditionalAttribute" }, GetAttributeNames(attrs1));
5636Assert.Equal(new[] { "CompilerGeneratedAttribute", "Attr" }, GetAttributeNames(attrs1));
5637Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.GetReturnTypeAttributes()));
5638Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.TypeParameters.Single().GetAttributes()));
5639Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.Parameters.Single().GetAttributes()));
5647Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(attrs1));
5752Assert.Equal(new[] { "DllImportAttribute" }, GetAttributeNames(localFunction.GetAttributes()));
5761Assert.Equal(
5827Assert.Equal(new[] { "DllImportAttribute" }, GetAttributeNames(localFunction.GetAttributes()));
5836Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(attrs1));
CodeGen\CodeGenTupleTest.cs (42)
499Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames);
513Assert.Equal(new[] { "x", "y" }, typeArg.TupleElementNames);
525Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames);
537Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames);
702Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames);
718Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames);
5861Assert.Equal(new[] { "System.Int32" }, ElementTypeNames(tupleWithoutNames));
5881Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames));
5918Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tuple));
5958Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames));
5976Assert.Equal(new[] { "Alice", "Bob" }, GetTupleElementNames(tupleWithNames));
5977Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithNames));
5995Assert.Equal(new[] { null, "Item2", "Charlie" }, GetTupleElementNames(tupleWithSomeNames));
5996Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32" }, ElementTypeNames(tupleWithSomeNames));
6013Assert.Equal(new[] { "Item2", "Item1" }, GetTupleElementNames(tupleWithNames));
6014Assert.Equal(new[] { "System.Int32", "System.Int32" }, ElementTypeNames(tupleWithNames));
6039Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" },
6065Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" },
6089Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8" }, GetTupleElementNames(tuple8WithNames));
6091Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" },
6116Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" },
6139Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9" }, GetTupleElementNames(tuple9WithNames));
6141Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" },
6171Assert.Equal(new[] { "Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9" }, GetTupleElementNames(tuple9WithNames));
6173Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.Int32", "System.Int32" },
6276Assert.Equal(new[] { "123", " ", null }, GetTupleElementNames(tuple2));
6280Assert.Equal(new[] { "return", "class" }, GetTupleElementNames(tuple3));
6372Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames));
6397Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tuple));
6420Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames));
6435Assert.Equal(new[] { "Alice", "Bob" }, GetTupleElementNames(tupleWithNames));
6436Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithNames));
6450Assert.Equal(new[] { "Item2", "Item1" }, GetTupleElementNames(tupleWithNames));
6451Assert.Equal(new[] { "System.Int32", "System.Int32" }, ElementTypeNames(tupleWithNames));
6471Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" },
6489Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8" }, GetTupleElementNames(tuple8WithNames));
6491Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" },
6512Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" },
6531Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9" }, GetTupleElementNames(tuple9WithNames));
6533Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" },
6564Assert.Equal(new[] { "123", " " }, GetTupleElementNames(tuple2));
6568Assert.Equal(new[] { "return", "class" }, GetTupleElementNames(tuple3));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (22)
Attributes\AttributeTests.cs (14)
620Assert.Equal(new[] { 2, 0, 1 }, attributeData.ConstructorArgumentsSourceIndices);
655Assert.Equal(new object[] { 1, 2, 3 }, attributeData.ConstructorArguments.Single().Values.Select(arg => arg.Value));
1123Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices);
1187Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices);
1226Assert.Equal(new[] { 0, 1 }, attributeData.ConstructorArgumentsSourceIndices);
1265Assert.Equal(new[] { 0, 1 }, attributeData.ConstructorArgumentsSourceIndices);
1303Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices);
1343Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices);
11015Assert.Equal(new[] { "Attr<System.Int32>" }, GetAttributeStrings(attrs));
11150Assert.Equal(new[] { "Attr<System.String>(Prop = \"a\")" }, GetAttributeStrings(attrs));
11244Assert.Equal(new[] { "Attr<System.String>(\"a\")" }, GetAttributeStrings(attrs));
11295Assert.Equal(new[]
11308Assert.Equal(new[]
11367Assert.Equal(new[] { "Attr<Attr<System.String>>" }, GetAttributeStrings(attrs));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (55)
Semantics\MultiDimensionalArrayTests.cs (24)
1118Assert.Equal(new[] { 5 }, array.Sizes);
1119Assert.Equal(new[] { 0 }, array.LowerBounds);
1125Assert.Equal(new[] { 5 }, array.Sizes);
1126Assert.Equal(new[] { 0 }, array.LowerBounds);
1132Assert.Equal(new[] { 5, 5 }, array.Sizes);
1139Assert.Equal(new[] { 5 }, array.Sizes);
1140Assert.Equal(new[] { 0, 2 }, array.LowerBounds);
1146Assert.Equal(new[] { 5, 7 }, array.Sizes);
1147Assert.Equal(new[] { 0, 2 }, array.LowerBounds);
1153Assert.Equal(new[] { 5 }, array.Sizes);
1154Assert.Equal(new[] { 1 }, array.LowerBounds);
1160Assert.Equal(new[] { 5 }, array.Sizes);
1161Assert.Equal(new[] { 1 }, array.LowerBounds);
1167Assert.Equal(new[] { 5, 5 }, array.Sizes);
1168Assert.Equal(new[] { 1, 0 }, array.LowerBounds);
1174Assert.Equal(new[] { 5 }, array.Sizes);
1175Assert.Equal(new[] { 1, 2 }, array.LowerBounds);
1181Assert.Equal(new[] { 5, 7 }, array.Sizes);
1182Assert.Equal(new[] { 1, 2 }, array.LowerBounds);
1189Assert.Equal(new[] { 1 }, array.LowerBounds);
1196Assert.Equal(new[] { 1 }, array.LowerBounds);
1203Assert.Equal(new[] { 1, 2 }, array.LowerBounds);
1209Assert.Equal(new[] { 5 }, array.Sizes);
1210Assert.Equal(new[] { 1 }, array.LowerBounds);
SourceGeneration\StateTableTests.cs (5)
93Assert.Equal(new[] { 2, 3 }, yieldItems(cachedEntries.Items));
405Assert.Equal(ImmutableArray.Create(1, 2, 3), (IEnumerable<int>)output.Value);
468Assert.Equal(ImmutableArray.Create(1, 2, 3), (IEnumerable<int>)output.Value);
515Assert.Equal(ImmutableArray.Create(1, 2), (IEnumerable<int>)output.Value);
582Assert.Equal(ImmutableArray.Create(1, 2, 4), (IEnumerable<int>)output.Value);
SourceGeneration\SyntaxAwareGeneratorTests.cs (11)
697Assert.Equal(new[] { "C", "D" }, classDeclarations);
754Assert.Equal(new[] { "C", "D" }, classDeclarations);
965Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, syntaxFilterVisited);
987Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, syntaxFilterVisited);
1326Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, fieldsCalledFor);
1588Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, syntaxCalledFor);
1645Assert.Equal(new[] { "fieldA", "fieldB", "fieldC", "fieldA", "fieldB", "fieldC" }, syntaxCalledFor);
1646Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, noCompareCalledFor);
1647Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, compareCalledFor);
1657Assert.Equal(new[] { "fieldD", "fieldE", "fieldF", "fieldD", "fieldE", "fieldF" }, syntaxCalledFor);
1658Assert.Equal(new[] { "fieldD", "fieldE", "fieldF" }, noCompareCalledFor);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (19)
SymbolDisplay\ObjectDisplayTests.cs (11)
135Assert.Equal(QuoteAndEscapingCombinations('a'), new[]
141Assert.Equal(QuoteAndEscapingCombinations('\t'), new[]
148Assert.Equal(QuoteAndEscapingCombinations('\u26f4'), new[]
155Assert.Equal(QuoteAndEscapingCombinations('\u007f'), new[]
162Assert.Equal(QuoteAndEscapingCombinations('\''), new[]
253Assert.Equal(QuoteAndEscapingCombinations(""), new[] { "", "", "\"\"", "\"\"" });
254Assert.Equal(QuoteAndEscapingCombinations("a"), new[] { "a", "a", "\"a\"", "\"a\"" });
255Assert.Equal(QuoteAndEscapingCombinations("\t"), new[] { "\t", "\\t", "\"\t\"", "\"\\t\"" });
256Assert.Equal(QuoteAndEscapingCombinations("\u26F4"), new[] { "\u26F4", "\u26F4", "\"\u26F4\"", "\"\u26F4\"" }); // Miscellaneous symbol
257Assert.Equal(QuoteAndEscapingCombinations("\u007f"), new[] { "\u007f", "\\u007f", "\"\u007f\"", "\"\\u007f\"" }); // Control character
258Assert.Equal(QuoteAndEscapingCombinations("\""), new[] { "\"", "\"", "\"\\\"\"", "\"\\\"\"" }); // Quote
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (45)
Collections\ImmutableSegmentedListTest.cs (8)
339Assert.Equal(new[] { 1, 3 }, modified2);
529Assert.Equal<int>(new[] { 4, 5, 8 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4));
530Assert.Equal<int>(new[] { 3, 6, 8 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 5, 6));
531Assert.Equal<int>(new[] { 3, 5, 9 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 8, 9));
537Assert.Equal<int>(new[] { 4, 3, 5 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4));
538Assert.Equal<int>(new[] { 4, 4, 5 }, System.Collections.Immutable.ImmutableList.Replace(System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4), 3, 4));
651Assert.Equal(new[] { 2 }, System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)list, new[] { 1, 3, 5 }));
661Assert.Equal(new[] { 1, 3 }, System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)ImmutableSegmentedList.Create(1, 2, 3), new[] { 2 }));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (14)
CodeGen\CodeGenTuples.vb (14)
6968Assert.Equal(New String() {"Alice", "Bob"}, GetTupleElementNames(tupleWithoutNames))
6989Assert.Equal(New String() {Nothing, "Item2", "Charlie"}, GetTupleElementNames(tupleWithSomeNames))
7007Assert.Equal(New String() {"Item2", "Item1"}, GetTupleElementNames(tupleWithoutNames))
7056Assert.Equal(New String() {"Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8"}, GetTupleElementNames(tuple8WithNames))
7106Assert.Equal(New String() {"Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9"}, GetTupleElementNames(tuple9WithNames))
7131Assert.Equal(New String() {"Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9"}, GetTupleElementNames(tuple9WithNames))
7174Assert.Equal({"123", " ", Nothing}, GetTupleElementNames(tuple2))
7178Assert.Equal({"return", "class"}, GetTupleElementNames(tuple3))
7316Assert.Equal(New String() {"Alice", "Bob"}, GetTupleElementNames(tupleWithoutNames))
7332Assert.Equal(New String() {"Item2", "Item1"}, GetTupleElementNames(tupleWithoutNames))
7373Assert.Equal(New String() {"Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8"}, GetTupleElementNames(tuple8WithNames))
7415Assert.Equal(New String() {"Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9"}, GetTupleElementNames(tuple9WithNames))
7453Assert.Equal({"123", " "}, GetTupleElementNames(tuple2))
7457Assert.Equal({"return", "class"}, GetTupleElementNames(tuple3))
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.Data.Analysis.Tests (4)
DataFrame.IOTests.cs (3)
697Assert.Equal(columnName, new[] { "vendor_id", "rate_code", "passenger_count", "trip_time_in_secs", "Column4", "Column5", "Column6", "Column7" });
712Assert.Equal(columnName, new[] { "vendor_id", "rate_code", "passenger_count", "trip_time_in_secs", "Column0", "Column1", "Column2", "Column3" });
1322Assert.Equal(_cells[i], df.Rows[i]);
Microsoft.DotNet.XUnitAssert.Tests (10)
AsyncCollectionAssertsTests.cs (2)
64 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices);
116 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices);
CollectionAssertsTests.cs (7)
62 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices);
114 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices);
703 Assert.Equal(expected, actual);
712 var ex = Record.Exception(() => Assert.Equal(expected, actual));
729 var ex = Record.Exception(() => Assert.Equal(expected, actual));
957 Assert.Equal(expected, actual);
1023 var ex = Record.Exception(() => Assert.Equal(expected, actual));
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (15)
DependencyInjection\HealthChecksBuilderTest.cs (8)
38Assert.Equal<string>(new[] { "tag", }, registration.Tags);
58Assert.Equal<string>(new[] { "tag", }, registration.Tags);
81Assert.Equal<string>(new[] { "tag", }, registration.Tags);
103Assert.Equal<string>(new[] { "tag", }, registration.Tags);
129Assert.Equal<string>(new[] { "tag", }, registration.Tags);
152Assert.Equal<string>(new[] { "tag", }, registration.Tags);
175Assert.Equal<string>(new[] { "tag", }, registration.Tags);
198Assert.Equal<string>(new[] { "tag", }, registration.Tags);
Microsoft.Extensions.Telemetry.Tests (4)
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
Microsoft.Gen.Metrics.Generated.Tests (30)
MetricTests.cs (22)
71Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
154Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
175Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2"), ("s3", "val3"), ("s4", "val4") }, tags);
178Assert.Equal(new (string, object?)[] { ("s1", "val3"), ("s2", "val4"), ("s3", "val5"), ("s4", "val6") }, tags);
199Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2"), ("s3", "val3"), ("s4", "val4") }, tags);
202Assert.Equal(new (string, object?)[] { ("s1", "val3"), ("s2", "val4"), ("s3", "val5"), ("s4", "val6") }, tags);
253Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
259Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
266Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value)));
278Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
284Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
291Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value)));
329Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value)));
342Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value)));
363Assert.Equal(
407Assert.Equal(
430Assert.Equal(
453Assert.Equal(
506Assert.Equal(
550Assert.Equal(
573Assert.Equal(
595Assert.Equal(
MetricTests.Ext.cs (8)
55Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
135Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
170Assert.Equal(
192Assert.Equal(
214Assert.Equal(
263Assert.Equal(
285Assert.Equal(
307Assert.Equal(
Microsoft.JSInterop.Tests (1)
Microsoft.ML.Core.Tests (1)
Microsoft.ML.TensorFlow.Tests (4)
TensorflowTests.cs (4)
597Assert.Equal(new[] { 5, 5, 1, 32 }, type.Dimensions);
612Assert.Equal(new[] { 28, 28, 32 }, type.Dimensions);
627Assert.Equal(new[] { 10 }, type.Dimensions);
646Assert.Equal(new[] { 2, 2 }, type.Dimensions);
Microsoft.ML.Tests (79)
Transformers\CategoricalHashTests.cs (20)
143Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
146Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" });
149Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
152Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
156Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
159Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "1:2", "0:5", "1:4", "1:6", "0:3", "0:1" });
162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "-1", "1" });
169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
174Assert.Equal(slots.Items().Select(x => x.Value.ToString()).Distinct(), new string[14] { "[0].", "[0].0:A", "[0].0:E", "[0].0:D", "[0].1:A", "[0].1:E", "[0].1:D", "[1].", "[1].0:A", "[1].0:E", "[1].0:D", "[1].1:A", "[1].1:E", "[1].1:D" });
177Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "65535", "65536", "131071" });
181Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
184Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "E", "D" });
187Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "65535" });
191Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
194Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" });
197Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
200Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
203Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
208Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
Transformers\CategoricalTests.cs (26)
221Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
224Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" });
227Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
230Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
234Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
237Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "3", "5" });
240Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
243Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" });
247Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
250Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[12] { "[0].1", "[0].2", "[0].3", "[0].4", "[0].5", "[0].6", "[1].1", "[1].2", "[1].3", "[1].4", "[1].5", "[1].6" });
253Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "5", "6", "11" });
257Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
260Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "1", "-1" });
263Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "1" });
267Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
270Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" });
273Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
276Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" });
279Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
282Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" });
285Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
288Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" });
292Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
295Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" });
298Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
301Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "Bit2", "Bit1", "Bit0" });
Transformers\KeyToBinaryVectorEstimatorTest.cs (4)
117Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
120Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" });
123Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
126Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" });
Transformers\KeyToVectorEstimatorTests.cs (18)
136Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
139Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" });
142Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
145Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
148Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 0 });
152Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
155Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[4] { "[0].3", "[0].5", "[1].3", "[1].5" });
158Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 1, 2, 3 });
162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" });
169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
172Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 5, 6, 11 });
176Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.IsNormalized });
180Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames });
183Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" });
186Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
189Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" });
192Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 1 });
Microsoft.ML.Tokenizers.Tests (70)
CodeGenTests.cs (44)
401Assert.Equal(ids.Take(ids.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, ids.Length - 1, out normalizedText, out length));
406Assert.Equal(ids.Take(ids.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), ids.Length - 1, out normalizedText, out length));
410Assert.Equal(expectedIds.Take(expectedIds.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, expectedIds.Length - 1, addPrefixSpace: false, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length));
413Assert.Equal(expectedIds.Take(expectedIds.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 1, addPrefixSpace: false, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length));
417Assert.Equal(expectedIdsWithSpace.Take(expectedIdsWithSpace.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, expectedIdsWithSpace.Length - 1, addPrefixSpace: true, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length));
420Assert.Equal(expectedIdsWithSpace.Take(expectedIdsWithSpace.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), expectedIdsWithSpace.Length - 1, addPrefixSpace: true, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length));
556Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
557Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
561Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
562Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
566Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
567Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
571Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
572Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
580Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
581Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
585Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
586Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
689Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
690Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
694Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
695Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
699Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
700Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
704Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
705Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
713Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
714Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
718Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
719Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
824Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
825Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
830Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
831Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
836Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
837Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
842Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
843Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
854Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
855Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
860Assert.Equal(idList, encoding.Select(t => t.Id).ToArray());
861Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray());
1000Assert.Equal(encodingIds.Take(expectedTokenCount), ids);
1005Assert.Equal(encodingIds.Take(expectedTokenCount), ids);
LlamaTests.cs (11)
267Assert.Equal(ids.Skip(1), bpeTokens.Select(token => token.Id));
268Assert.Equal(tokens.Skip(1), bpeTokens.Select(token => token.Value));
273Assert.Equal(ids.Skip(1), encodedIds);
277Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id));
278Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Skip(1).Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value));
283Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), encodedIds);
287Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id));
288Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value));
293Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), encodedIds);
596Assert.Equal(expectedIds1.Take(expectedIds1.Length - 6), sentencePieceBpe.EncodeToIds(
611Assert.Equal(expectedIds1.Take(expectedIds1.Length - 6), sentencePieceBpe.EncodeToIds(
TiktokenTests.cs (8)
151Assert.Equal(new List<Range> { new Range(0, 5), new Range(5, 11) }, offsets);
205Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 6), (23, 10) }, offsets);
248Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 10), (27, 6) }, offsets);
278Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 2), (18, 1), (19, 6), (25, 10) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray());
313Assert.Equal(new List<(int, int)> { (0, 13), (13, 5), (18, 2), (20, 6), (26, 15) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray());
588Assert.Equal(expectedIds.Take(expectedIds.Length - 4), tokenizer.EncodeToIds(text, expectedIds.Length - 4, out normalizedText, out length));
592Assert.Equal(expectedIds.Take(expectedIds.Length - 4), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 4, out normalizedText, out length));
686Assert.Equal(expectedTokens, result.Select(r => r.Value));
Microsoft.Net.Http.Headers.Tests (1)
Microsoft.VisualBasic.Tests (4)
System.Drawing.Common.Tests (9)
System.Windows.Forms.Design.Tests (46)
System.Windows.Forms.Tests (1492)
System.Xaml.Tests (2)
VBCSCompiler.UnitTests (10)
BuildClientTests.cs (10)
219Assert.Equal(new[] { "test.cs" }, _parsedArgs);
230Assert.Equal(new[] { "test.cs" }, _parsedArgs);
235Assert.Equal(new[] { "test.cs" }, _parsedArgs);
240Assert.Equal(new[] { "test.cs" }, _parsedArgs);
260Assert.Equal(new[] { optionPrefix + "sharedstart", "test.cs" }, _parsedArgs);
271Assert.Equal(new[] { "test.cs" }, _parsedArgs);
277Assert.Equal(new[] { "test.cs" }, _parsedArgs);
305Assert.Equal(new[] { optionPrefix + "keepalivestart", "test.cs" }, _parsedArgs);
315Assert.Equal(new[] { "test.cs" }, _parsedArgs);
321Assert.Equal(new[] { "test.cs" }, _parsedArgs);