Add tests for objc with inline block
Refactor and make it compatible with inline block