2 instantiations of CollectionTracker
xunit.assert (2)
Sdk\CollectionTracker.cs (2)
452 new CollectionTracker<object>(enumerable, enumerable.Cast<object>()); 815 new CollectionTracker<T>(collection);
68 references to CollectionTracker
Microsoft.DotNet.XUnitAssert.Tests (24)
MemoryAssertsTests.cs (1)
411 "Memory: " + CollectionTracker<int>.FormatStart(data) + Environment.NewLine +
Sdk\CollectionTrackerTests.cs (22)
16 var tracker = new[] { 42, 2112 }.AsTracker(); 28 var tracker = new[] { 42, 2112 }.AsTracker(); 40 var tracker = new[] { 1, 2, 3, 4, 5, 6, 7 }.AsTracker(); 52 var tracker = new[] { 1, 2, 3, 4, 5, 6, 7 }.AsTracker(); 64 var tracker = new[] { 1, 2, 3, 4, 5, 6, 7 }.AsTracker(); 82 var result = CollectionTracker<int>.FormatIndexedMismatch(span, 2600, out var pointerIndent, ArgumentFormatter.MAX_DEPTH); 94 var result = CollectionTracker<int>.FormatIndexedMismatch(span, 0, out var pointerIndent); 106 var result = CollectionTracker<int>.FormatIndexedMismatch(span, 1, out var pointerIndent); 118 var result = CollectionTracker<int>.FormatIndexedMismatch(span, 3, out var pointerIndent); 130 var result = CollectionTracker<int>.FormatIndexedMismatch(span, 6, out var pointerIndent); 144 var tracker = new object[0].AsTracker(); 152 var tracker = new object[0].AsTracker(); 164 var tracker = new object[] { 1, 2.3M, "Hello, world!" }.AsTracker(); 176 var tracker = new object[] { 1, 2.3M, "Hello, world!", 42, 2112, new object() }.AsTracker(); 189 Assert.Equal("[]", CollectionTracker<object>.FormatStart(collection)); 197 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(collection, ArgumentFormatter.MAX_DEPTH)); 209 Assert.Equal($"[1, {2.3M}, \"Hello, world!\"]", CollectionTracker<object>.FormatStart(collection)); 221 Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(collection)); 233 Assert.Equal("[]", CollectionTracker<object>.FormatStart(span)); 241 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(span, ArgumentFormatter.MAX_DEPTH)); 253 Assert.Equal($"[1, {2.3M}, \"Hello, world!\"]", CollectionTracker<object>.FormatStart(span)); 265 Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(span));
SpanAssertsTests.cs (1)
411 "Span: " + CollectionTracker<int>.FormatStart(data) + Environment.NewLine +
xunit.assert (44)
CollectionAsserts.cs (8)
163 using (var tracker = collection.AsTracker()) 204 using (var tracker = collection.AsTracker()) 280 using (var tracker = collection.AsTracker()) 299 using (var tracker = collection.AsTracker()) 332 using (var tracker = collection.AsTracker()) 392 using (var tracker = collection.AsTracker()) 430 using (var tracker = collection.AsTracker()) 708 using (var tracker = collection.AsTracker())
DictionaryAsserts.cs (4)
63 CollectionTracker<TKey>.FormatStart(collection.Keys) 97 CollectionTracker<TKey>.FormatStart(collection.Keys) 220 CollectionTracker<TKey>.FormatStart(collection.Keys) 246 CollectionTracker<TKey>.FormatStart(collection.Keys)
MemoryAsserts.cs (4)
103 CollectionTracker<T>.FormatStart(expectedSubMemory.Span), 104 CollectionTracker<T>.FormatStart(actualMemory.Span) 184 var formattedExpected = CollectionTracker<T>.FormatStart(expectedSpan); 185 var formattedActual = CollectionTracker<T>.FormatIndexedMismatch(actualSpan, idx, out failurePointerIndent);
Sdk\CollectionTracker.cs (6)
43 /// Base class for generic <see cref="CollectionTracker{T}"/>, which also includes some public 428 /// returned by <see cref="CollectionTracker{T}.GetEnumerator"/>, except non-generic. 448 /// Wraps an untyped enumerable in an object-based <see cref="CollectionTracker{T}"/>. 451 public static CollectionTracker<object> Wrap(IEnumerable enumerable) => 811 /// Wraps the given collection inside of a <see cref="CollectionTracker{T}"/>. 814 public static CollectionTracker<T> Wrap(IEnumerable<T> collection) =>
Sdk\CollectionTrackerExtensions.cs (6)
32 /// Extension methods related to <see cref="CollectionTracker{T}"/>. 61 /// Wraps the given enumerable in an instance of <see cref="CollectionTracker{T}"/>. 101 /// Wraps the given enumerable in an instance of <see cref="CollectionTracker{T}"/>. 107 public static CollectionTracker<T>? AsTracker<[DynamicallyAccessedMembers( 118 : enumerable as CollectionTracker<T> ?? CollectionTracker<T>.Wrap(enumerable);
SetAsserts.cs (12)
46 CollectionTracker<T>.FormatStart(set) 73 CollectionTracker<T>.FormatStart(set) 144 CollectionTracker<T>.FormatStart(set) 170 CollectionTracker<T>.FormatStart(set) 259 CollectionTracker<T>.FormatStart(expectedSubset), 260 actual == null ? "null" : CollectionTracker<T>.FormatStart(actual) 288 CollectionTracker<T>.FormatStart(expectedSuperset), 289 actual == null ? "null" : CollectionTracker<T>.FormatStart(actual) 312 CollectionTracker<T>.FormatStart(expectedSubset), 313 actual == null ? "null" : CollectionTracker<T>.FormatStart(actual) 336 CollectionTracker<T>.FormatStart(expectedSuperset), 337 actual == null ? "null" : CollectionTracker<T>.FormatStart(actual)
SpanAsserts.cs (4)
101 CollectionTracker<T>.FormatStart(expectedSubSpan), 102 CollectionTracker<T>.FormatStart(actualSpan) 177 var formattedExpected = CollectionTracker<T>.FormatStart(expectedSubSpan); 178 var formattedActual = CollectionTracker<T>.FormatIndexedMismatch(actualSpan, idx, out failurePointerIndent);