tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test-ExecutableAllocator.py (730B)


      1 # Tests for ExecutableAllocator pretty-printing
      2 # Ignore flake8 errors "undefined name 'assert_regexp_pretty'"
      3 # As it caused by the way we instanciate this file
      4 # flake8: noqa: F821
      5 
      6 assert_subprinter_registered("SpiderMonkey", "JS::GCCellPtr")
      7 
      8 run_fragment("ExecutableAllocator.empty")
      9 
     10 assert_pretty("execAlloc", "ExecutableAllocator([])")
     11 
     12 run_fragment("ExecutableAllocator.onepool")
     13 
     14 reExecPool = "ExecutablePool [a-f0-9]{8,}-[a-f0-9]{8,}"
     15 assert_regexp_pretty("pool", reExecPool)
     16 assert_regexp_pretty("execAlloc", r"ExecutableAllocator\(\[" + reExecPool + r"\]\)")
     17 
     18 run_fragment("ExecutableAllocator.twopools")
     19 
     20 assert_regexp_pretty(
     21    "execAlloc", r"ExecutableAllocator\(\[" + reExecPool + ", " + reExecPool + r"\]\)"
     22 )