core: add api for write tests using smali
core: fix constructor call for moved arg (fix #20)