Skip to content

Commit

Permalink
Adding tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Dec 21, 2023
1 parent 0130cea commit 9ab3b79
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 @@ -103,6 +103,14 @@ def test_cmd_heap_chunks_summary(self):
self.assertIn("== Chunk distribution by size", res)
self.assertIn("== Chunk distribution by flag", res)

def test_cmd_heap_chunks_summary_with_type_resolved(self):
cmd = "heap chunks --summary --resolve"
target = _target("class")
res = gdb_run_silent_cmd(cmd, target=target, before=["b B<TraitA, TraitB>::Run()"])
self.assertNoException(res)
self.assertIn("== Chunk distribution by size", res)
self.assertIn("B<TraitA, TraitB>", res)

def test_cmd_heap_chunks_min_size_filter(self):
cmd = "heap chunks --min-size 16"
target = _target("heap")
Expand Down

0 comments on commit 9ab3b79

Please sign in to comment.