Move tests to separate file.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>