Skip to content

Commit

Permalink
Remove IMallocSpy uses and related tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronRobinsonMSFT committed Jun 21, 2022
1 parent 510c668 commit 3c9aaea
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 303 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,6 @@ namespace System.Windows.Forms.Primitives.Ole32Tests
{
public class CADWORDTests
{
[Fact]
public void CADWORD_ConvertAndFree_FreesMemory()
{
List<IntPtr> allocations = new();
Ole32.CADWORD ca = CreateIntVector(allocations, 1970, 1999);

MallocSpy.FreeTracker tracker = new();
using MallocSpyScope scope = new(tracker);

uint[] values = ca.ConvertAndFree();
Assert.Equal(2, values.Length);
Assert.Equal(1970u, values[0]);
Assert.Equal(1999u, values[1]);

foreach (IntPtr allocation in allocations)
{
Assert.Contains(allocation, tracker.FreedBlocks);
}
}

[Fact]
public void CADWORD_ConvertAndFree_SingleItem()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,6 @@ namespace System.Windows.Forms.Primitives.Ole32Tests
{
public class CALPOLESTRTests
{
[Fact]
public void CALPOLESTR_ConvertAndFree_FreesMemory()
{
List<IntPtr> allocations = new();
Ole32.CALPOLESTR ca = CreateStringVector(allocations, "Sweet", "Potato");

MallocSpy.FreeTracker tracker = new();
using MallocSpyScope scope = new(tracker);

string?[] values = ca.ConvertAndFree();
Assert.Equal(2, values.Length);
Assert.Equal("Sweet", values[0]);
Assert.Equal("Potato", values[1]);

foreach (IntPtr allocation in allocations)
{
Assert.Contains(allocation, tracker.FreedBlocks);
}
}

[Fact]
public void CALPOLESTR_ConvertAndFree_SingleItem()
{
Expand Down

0 comments on commit 3c9aaea

Please sign in to comment.