wiz-lang / wiz

A high-level assembly language for writing homebrew software and games on retro console platforms.
http://wiz-lang.org/
Other
409 stars 40 forks source link

Test Z80 calls #122

Closed lhsazevedo closed 3 years ago

lhsazevedo commented 3 years ago

Test results for regular calls:

$ bash tests/wiztests.sh -w bin/wiz -b tests/bin/ tests/block/z80_func_call.wiz
Python 2.7.17
tests/block/z80_func_call.wiz:('bin/wiz', '--system', 'z80', '-o', 'tests/bin/z80_func_call.z80.bin', 'tests/block/z80_func_call.wiz')
 FAILED
    > bin/wiz --system z80 -o tests/bin/z80_func_call.z80.bin tests/block/z80_func_call.wiz
    wiz returned failure code 1 in a block test
    * wiz: version 0.1.2 (alpha)
    >> Parsing...
    tests/block/z80_func_call.wiz:16: error: expected `;` after previous statement, but got keyword `if` instead
    tests/block/z80_func_call.wiz:16: error: expected `{`, but got `;` instead
    tests/block/z80_func_call.wiz:18: error: expected `;` after previous statement, but got keyword `if` instead
    tests/block/z80_func_call.wiz:18: error: expected `{`, but got `;` instead
    tests/block/z80_func_call.wiz:20: error: expected `;` after previous statement, but got keyword `if` instead
    tests/block/z80_func_call.wiz:20: error: expected `{`, but got `;` instead
    tests/block/z80_func_call.wiz:22: error: expected `;` after previous statement, but got keyword `if` instead
    tests/block/z80_func_call.wiz:22: error: expected `{`, but got `;` instead
    tests/block/z80_func_call.wiz:29: error: expected `}` to close block `{`, but got end-of-file instead
    tests/block/z80_func_call.wiz:18: note: block `{` started here
    tests/block/z80_func_call.wiz:29: error: expected `}` to close block `{`, but got end-of-file instead
    tests/block/z80_func_call.wiz:16: note: block `{` started here
    tests/block/z80_func_call.wiz:29: error: expected `}` to close block `{`, but got end-of-file instead
    tests/block/z80_func_call.wiz:12: note: block `{` started here
    tests/block/z80_func_call.wiz:29: error: expected `}` to close block `{`, but got end-of-file instead
    tests/block/z80_func_call.wiz:6: note: block `{` started here
    * wiz: failed with 12 error(s).

0 tests passed
1 TESTS FAILED

Test results for tail calls:

$ bash tests/wiztests.sh -w bin/wiz -b tests/bin/ tests/block/z80_func_tail_call.wiz 
Python 2.7.17
tests/block/z80_func_tail_call.wiz:('bin/wiz', '--system', 'z80', '-o', 'tests/bin/z80_func_tail_call.z80.bin', 'tests/block/z80_func_tail_call.wiz')
 FAILED
    > bin/wiz --system z80 -o tests/bin/z80_func_tail_call.z80.bin tests/block/z80_func_tail_call.wiz
    tests/bin/z80_func_tail_call.z80.bin 0x000003: expected 0x20 got 0x18
    tests/bin/z80_func_tail_call.z80.bin 0x000005: expected 0x28 got 0x18
    tests/bin/z80_func_tail_call.z80.bin 0x000007: expected 0x30 got 0x18
    tests/bin/z80_func_tail_call.z80.bin 0x000009: expected 0x38 got 0x18
    tests/bin/z80_func_tail_call.z80.bin 0x00000e: expected 0xc2 got 0xc3
    tests/bin/z80_func_tail_call.z80.bin 0x000011: expected 0xca got 0xc3
    + 2 more incorrect bytes

0 tests passed
1 TESTS FAILED
Bananattack commented 3 years ago

Thanks for providing these tests, I'll create an issue about actually making those tests pass.

lhsazevedo commented 3 years ago

No problem! =D