@echo off

set problem=chronicle
set author=dk

echo Generating tests...
cd src
python genTests.py
cd ..

dcc32 -U..\..\lib -cc check.dpr

echo Generating answers...
dcc32 -cc %problem%_%author%.dpr
for %%i in (tests\??) do (
	echo Test %%i
	copy %%i %problem%.in > nul
	%problem%_%author%.exe
	copy %problem%.out %%i.a > nul
	echo Check %%i
	check %%i %%i.a %%i.a
)
