1import nose
2
3import logging
4
5from angr import SimState
6
7l = logging.getLogger('angr.tests.syscalls.mmap')
8
9
10def test_mmap_base_copy():
11    state = SimState(arch="AMD64", mode="symbolic")
12
13    mmap_base = 0x12345678
14
15    state.heap.mmap_base = mmap_base
16
17    # Sanity check
18    nose.tools.assert_equal(state.heap.mmap_base, mmap_base)
19
20    state_copy = state.copy()
21
22    nose.tools.assert_equal(state_copy.heap.mmap_base, mmap_base)
23
24
25if __name__ == '__main__':
26    g = globals().copy()
27    for func_name, func in g.items():
28        if func_name.startswith("test_") and hasattr(func, "__call__"):
29            func()
30