tests: Add StaticFieldTest, fix code indent

Signed-off-by: Jiao Xiang <jxwr.cn@gmail.com>