Skip to content

Commit

Permalink
Add test.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Dec 16, 2023
1 parent 2416cbf commit 5bb3c15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/commands/heap.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ def test_cmd_heap_chunks_mult_heaps(self):
self.assertIn("Chunk(addr=", res)
self.assertIn("top chunk", res)

def test_cmd_heap_chunks_summary(self):
cmd = "heap chunks --summary"
target = _target("heap")
self.assertFailIfInactiveSession(gdb_run_cmd(cmd, target=target))
res = gdb_run_silent_cmd(cmd, target=target)
self.assertNoException(res)
self.assertIn("== Chunk distribution by size", res)
self.assertIn("== Chunk distribution by flag", res)

def test_cmd_heap_bins_fast(self):
cmd = "heap bins fast"
Expand Down

0 comments on commit 5bb3c15

Please sign in to comment.