mirror of
https://github.com/ZornsLemma/lib6502-jit.git
synced 2025-07-16 02:24:04 +00:00
First public release
This commit is contained in:
33
test/run-c-tests.py
Executable file
33
test/run-c-tests.py
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from __future__ import print_function
|
||||
import subprocess
|
||||
|
||||
tests = [
|
||||
'basic-callback',
|
||||
'call-illegal-callback-modify-code',
|
||||
'irq-nmi',
|
||||
'setjmp-trick',
|
||||
'stack-code-brk',
|
||||
'stack-code-jsr',
|
||||
'write-callback-modify-code'
|
||||
]
|
||||
|
||||
test_args = [
|
||||
'-mi',
|
||||
'-mh',
|
||||
'-mc -mx 1',
|
||||
'-mc'
|
||||
]
|
||||
|
||||
print('1..', len(tests) * len(test_args), sep='')
|
||||
i = 1
|
||||
for test_arg in test_args:
|
||||
for test in tests:
|
||||
result = subprocess.check_output(['test/' + test] + test_arg.split())
|
||||
expected_result = open('test/' + test + '.mst', 'rb').read()
|
||||
if result == expected_result:
|
||||
print('ok', i, test, test_arg)
|
||||
else:
|
||||
print('not ok', i, test, test_arg)
|
||||
i += 1
|
Reference in New Issue
Block a user