Skip to content

Commit c7a375d

Browse files
committed
Tests added for ZXNext
1 parent ddd6aef commit c7a375d

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

tests/api/test_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ def test_initted_values(self):
7373
'strict',
7474
'strictBool',
7575
'string_base',
76-
'use_loader'])
76+
'use_loader',
77+
'zxnext'])

tests/functional/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ def testASM(fname, inline=None, cmdline_args=None):
320320
os.unlink(okfile)
321321

322322
options = [fname, '-o', tfname] + prep
323+
if fname.startswith('zxnext_'):
324+
options.append('--zxnext')
323325
options.extend(cmdline_args)
324326

325327
if inline:

tests/functional/test_asm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212

1313
@pytest.mark.parametrize('fname', [os.path.join(TEST_PATH, f) for f in os.listdir(TEST_PATH) if f.endswith(".asm")])
1414
def test_asm(fname):
15-
test.main(['-d', '-e', '/dev/null', fname])
15+
options = ['-d', '-e', '/dev/null', fname]
16+
if os.path.basename(fname).startswith('zxnext_'):
17+
options.extend(['-O=-N'])
18+
19+
test.main(options)
1620
if test.COUNTER == 0:
1721
return
1822

tests/functional/zxnext_all.asm

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
LDIX
2+
LDWS
3+
LDIRX
4+
LDDX
5+
LDDRX
6+
LDPIRX
7+
OUTINB
8+
MUL D,E
9+
ADD HL,A
10+
ADD DE,A
11+
ADD BC,A
12+
ADD HL,0201h
13+
ADD DE,0201h
14+
ADD BC,0201h
15+
SWAPNIB
16+
MIRROR
17+
PUSH 4321h
18+
NEXTREG 37h,38h
19+
NEXTREG 33h,A
20+
PIXELDN
21+
PIXELAD
22+
SETAE
23+
TEST 77h
24+
BSLA DE,B
25+
BSRA DE,B
26+
BSRL DE,B
27+
BSRF DE,B
28+
BRLC DE,B
29+
JP (C)
30+

tests/functional/zxnext_all.bin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
��������������0�1�2�3�4�5�6�#�$�C!�78�3����'w�(�)�*�+�,�

0 commit comments

Comments
 (0)