mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 05:31:06 +00:00
b7487d4edc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152483 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
544 B
Python
19 lines
544 B
Python
from .base import TestBase
|
|
from ..core import OpCode
|
|
from ..core import MemoryBuffer
|
|
|
|
class TestCore(TestBase):
|
|
def test_opcode(self):
|
|
self.assertTrue(hasattr(OpCode, 'Ret'))
|
|
self.assertTrue(isinstance(OpCode.Ret, OpCode))
|
|
self.assertEqual(OpCode.Ret.value, 1)
|
|
|
|
op = OpCode.from_value(1)
|
|
self.assertTrue(isinstance(op, OpCode))
|
|
self.assertEqual(op, OpCode.Ret)
|
|
|
|
def test_memory_buffer_create_from_file(self):
|
|
source = self.get_test_binary()
|
|
|
|
MemoryBuffer(filename=source)
|