test repeat db
This commit is contained in:
parent
09d636c02c
commit
f2d0630f20
11
asm/test.py
11
asm/test.py
|
@ -448,6 +448,17 @@ class DataTest(unittest.TestCase):
|
||||||
self.assertEqual(ex(), ffi.RunRet.STOP)
|
self.assertEqual(ex(), ffi.RunRet.STOP)
|
||||||
self.assertEqual(ex.getdat(0), [1,2,3,4])
|
self.assertEqual(ex.getdat(0), [1,2,3,4])
|
||||||
self.assertEqual(ex.getdat(1), [0x10,0x11,0x12,0x13])
|
self.assertEqual(ex.getdat(1), [0x10,0x11,0x12,0x13])
|
||||||
|
def test_alloc_repeat(self):
|
||||||
|
p = Program()
|
||||||
|
p.parse_lines([
|
||||||
|
"db d0 [1,2,3,4]",
|
||||||
|
"db d1 [10,11,12,13]",
|
||||||
|
"db d0 [5,6,7,8,9]"
|
||||||
|
])
|
||||||
|
ex = ffi.Environment(p())
|
||||||
|
self.assertEqual(ex(), ffi.RunRet.STOP)
|
||||||
|
self.assertEqual(ex.getdat(0), [5,6,7,8,9])
|
||||||
|
self.assertEqual(ex.getdat(1), [0x10,0x11,0x12,0x13])
|
||||||
|
|
||||||
class SCEnv(ffi.Environment):
|
class SCEnv(ffi.Environment):
|
||||||
def syscall(self, s):
|
def syscall(self, s):
|
||||||
|
|
Loading…
Reference in New Issue