Move test codes to test dir

Signed-off-by: Kohei Takahashi <flast@flast.jp>