@echo off
if "%1"=="" (set TEST=??) else (set TEST=%1)
set TASK=covering
pushd ..
if NOT exist %TASK%_am_other.exe call cs %TASK%_am_other.cpp
if NOT exist %TASK%_ik_pattern.exe call cs %TASK%_ik_pattern.cpp
if NOT exist %TASK%_ik_random.exe call cs %TASK%_ik_random.cpp
if NOT exist %TASK%_ik_anneal.exe call cs %TASK%_ik_anneal.cpp
if NOT exist %TASK%_ik_combo.exe call cs %TASK%_ik_combo.cpp
if NOT exist %TASK%_ik_other.exe call cs %TASK%_ik_other.cpp
popd
for %%i in (%TEST%) do (
echo Test %%i:
pushd ..
copy tests\%%i %TASK%.in >nul
%TASK%_am_other
copy %TASK%.out tests\%%i.b >nul
%TASK%_ik_pattern
copy %TASK%.out tests\%%i.c >nul
%TASK%_ik_random
copy %TASK%.out tests\%%i.d >nul
%TASK%_ik_anneal
copy %TASK%.out tests\%%i.e >nul
%TASK%_ik_combo
copy %TASK%.out tests\%%i.f >nul
%TASK%_ik_other
copy %TASK%.out tests\%%i.f >nul
popd
check %%i %%i.b %%i.a
check %%i %%i.c %%i.a
check %%i %%i.d %%i.a
check %%i %%i.e %%i.a
check %%i %%i.f %%i.a
check %%i %%i.g %%i.a
)
