Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit d6b2ead

Browse files
authored
Fix test for GC.GetAllocatedBytesForCurrentThread to be more lenient with the accuracy (#16976)
1 parent df996e2 commit d6b2ead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/src/GC/API/GC/GetAllocatedBytesForCurrentThread.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static bool TestCore1(bool testWithCollection)
8989

9090
nBytesAfter = (long)method.Invoke(null, null);
9191

92-
if (((nBytesBefore + 16) != nBytesAfter) && ((nBytesBefore + 24) != nBytesAfter))
92+
if (nBytesAfter == nBytesBefore) // Shouldn't be the same
9393
{
9494
int countAfter = GC.CollectionCount(0);
9595
Console.WriteLine("b: {0}, a: {1}, iter {2}, {3}->{4}", nBytesBefore, nBytesAfter, i, countBefore, countAfter);

0 commit comments

Comments
 (0)