summaryrefslogtreecommitdiffstats
path: root/js/src/gdb/tests/test-ExecutableAllocator.py
blob: 6a3ae4aae1ec6dcfe5b1655af06de131efe2ec6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Tests for ExecutableAllocator pretty-printing
# Ignore flake8 errors "undefined name 'assert_regexp_pretty'"
# As it caused by the way we instanciate this file
# flake8: noqa: F821

assert_subprinter_registered("SpiderMonkey", "JS::GCCellPtr")

run_fragment("ExecutableAllocator.empty")

assert_pretty("execAlloc", "ExecutableAllocator([])")

run_fragment("ExecutableAllocator.onepool")

reExecPool = "ExecutablePool [a-f0-9]{8,}-[a-f0-9]{8,}"
assert_regexp_pretty("pool", reExecPool)
assert_regexp_pretty("execAlloc", r"ExecutableAllocator\(\[" + reExecPool + r"\]\)")

run_fragment("ExecutableAllocator.twopools")

assert_regexp_pretty(
    "execAlloc", r"ExecutableAllocator\(\[" + reExecPool + ", " + reExecPool + r"\]\)"
)