2019-09-20 01:50:30 +00:00
|
|
|
@echo off
|
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
if NOT EXIST results mkdir results
|
2019-09-20 01:50:30 +00:00
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo Unit tests for x65 assembler >results\unittest.txt
|
|
|
|
echo >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo 65816 Force Addressing Mode Test >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 AddrMode_65816.s -cpu=65816 -lst >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% EQU 0 goto addrmode_pass
|
|
|
|
:addrmode_fail
|
|
|
|
echo Force Addressing Mode failed
|
|
|
|
goto exit
|
|
|
|
:addrmode_pass
|
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo 65816 Local Label Symbol Test >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 local_label.s -cpu=65816 -lst >>results\unittest.txt
|
|
|
|
if %errorlevel% EQU 0 goto locallabel_pass
|
|
|
|
:locallabel_feil
|
|
|
|
echo Local Label Symbol Test failed
|
|
|
|
goto exit
|
|
|
|
:locallabel_pass
|
|
|
|
|
|
|
|
echo 65816 OpCodes Test >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 Test65816_OpCodes.s -cpu=65816 -lst >>results\unittest.txt
|
|
|
|
if %errorlevel% EQU 0 goto opcodes_65816_pass
|
|
|
|
:opcodes_65816_fail
|
|
|
|
echo 65816 OpCodes failed
|
|
|
|
goto exit
|
|
|
|
:opcodes_65816_pass
|
|
|
|
|
|
|
|
echo Merlin Macro Test >>results\unittest.txt
|
|
|
|
echo ----------------- >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 merlin_macro.s results\merlin_macro.bin -bin -org=$1000 -merlin -lst >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% GTR 0 goto mermac_fail
|
2019-09-20 04:07:04 +00:00
|
|
|
fc /B compare\merlin_macro_cmp.bin results\merlin_macro.bin >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% EQU 0 goto mermac_pass
|
|
|
|
:mermac_fail
|
|
|
|
echo Merlin macro test failed
|
|
|
|
goto exit
|
|
|
|
:mermac_pass
|
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo 8BitDiff Test >>results\unittest.txt
|
|
|
|
echo ------------- >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 8BitDiff_6502.s results\8BitDiff_6502.prg -kickasm -sym results\8BitDiff_6502.sym -lst >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% GTR 0 goto 8BitDiff_6502_fail
|
2019-09-20 04:07:04 +00:00
|
|
|
fc /B compare\8BitDiff_6502_cmp.prg results\8BitDiff_6502.prg >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% EQU 0 goto 8BitDiff_6502_pass
|
|
|
|
:8BitDiff_6502_fail
|
|
|
|
echo 8BitDiff_6502 test failed
|
|
|
|
goto exit
|
|
|
|
:8BitDiff_6502_pass
|
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo Alias Test >>results\unittest.txt
|
|
|
|
echo ---------- >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 alias_test.s results\alias_test.prg -sym results\alias_test.sym -lst >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% GTR 0 goto alias_test_fail
|
2019-09-20 04:07:04 +00:00
|
|
|
fc /B compare\alias_test_cmp.prg results\alias_test.prg >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% EQU 0 goto alias_test_pass
|
|
|
|
:alias_test_fail
|
|
|
|
echo Alias test failed
|
|
|
|
goto exit
|
|
|
|
:alias_test_pass
|
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo x65macro.i Test >>results\unittest.txt
|
|
|
|
echo --------------- >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 x65macro_test.s results\x65macro_test.prg -org=$1000 -sym results\x65macro_test.sym -lst >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% GTR 0 goto x65macro_test_fail
|
2019-09-20 04:07:04 +00:00
|
|
|
fc /B compare\x65macro_test_cmp.prg results\x65macro_test.prg >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% EQU 0 goto x65macro_test_pass
|
|
|
|
:x65macro_test_fail
|
|
|
|
echo x65macro.i test failed
|
|
|
|
goto exit
|
|
|
|
:x65macro_test_pass
|
|
|
|
|
2019-09-21 01:20:30 +00:00
|
|
|
echo x65 Scope Test >>results\unittest.txt
|
2019-10-17 22:53:28 +00:00
|
|
|
..\bin\x64\x65 x65scope.s results\x65scope.prg -lst -sym results\x65scope.sym >>results\unittest.txt
|
2019-09-21 01:20:30 +00:00
|
|
|
if %errorlevel% GTR 0 goto x65scope_test_fail
|
|
|
|
fc /B compare\x65scope.prg results\x65scope.prg >>results\unittest.txt
|
|
|
|
if %errorlevel% GTR 0 goto x65scope_test_fail
|
|
|
|
fc compare\x65scope.sym results\x65scope.sym >>results\unittest.txt
|
|
|
|
if %errorlevel% EQU 0 goto x65scope_test_pass
|
|
|
|
:x65scope_test_fail
|
|
|
|
echo x65 Scope Test failed
|
|
|
|
goto exit
|
|
|
|
:x65scope_test_pass
|
|
|
|
|
2019-09-20 04:07:04 +00:00
|
|
|
echo Merlin LUP Test >>results\unittest.txt
|
|
|
|
echo --------------- >>results\unittest.txt
|
|
|
|
..\bin\x64\x65 merlin_lup.s results\merlin_lup.bin -bin -org=$1000 -merlin -lst >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% GTR 0 goto merlup_fail
|
2019-09-20 04:07:04 +00:00
|
|
|
fc /B compare\merlin_lup_cmp.bin results\merlin_lup.bin >>results\unittest.txt
|
2019-09-20 01:50:30 +00:00
|
|
|
if %errorlevel% EQU 0 goto merlup_pass
|
|
|
|
:merlup_fail
|
|
|
|
echo Merlin LUP test failed
|
|
|
|
goto exit
|
|
|
|
:merlup_pass
|
|
|
|
|
|
|
|
|
|
|
|
echo All Tests Passed
|
|
|
|
goto exit
|
|
|
|
|
|
|
|
|
|
|
|
:exit
|