You missed a header file: dtw.h in the files you attached.
You know what they say, read the manual...
The TB needs to return 0 when success and non-zero when fail; (see it as if it returns the number of errors).
Your TB doesn't do that (it's void main() so doesn't return value) so that's the first thing to address.
*PLEASE* do not return a constant value, otherwise your TB will always return the same result, independently of your design working or not!
Also it looks like you use vars t1 and t2 used both in TB and toplevel, that doesn't sound correct..