add tests for free

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>