| 186 | } |
| 187 | |
| 188 | fn testcase() -> String { |
| 189 | r#" |
| 190 | [ |
| 191 | [ |
| 192 | {"method":"balanceOf", "expected":"int:0"}, |
| 193 | {"method":"transferFromAdmin", "needcontext":true, "param":"int:100", "expected":"bool:true"}, |
| 194 | {"method":"balanceOf", "expected":"int:100"}, |
| 195 | {"method":"approveAndTransferFromAdmin", "needcontext":true, "param":"int:100", "expected":"bool:true"}, |
| 196 | {"method":"balanceOf", "expected":"int:200"}, |
| 197 | {"method":"transferToAdmin", "needcontext":true, "param":"int:200", "expected":"bool:true"}, |
| 198 | {"method":"balanceOf", "expected":"int:0"}, |
| 199 | |
| 200 | {"method":"storage_write"}, |
| 201 | {"method":"storage_write2"}, |
| 202 | {"needcontext":true, "env":{"witness":[]}, "method":"test_callwasm", "param":"string:add, int:1, int:2", "expected":"int:3"}, |
| 203 | {"method":"test_migrate"} |
| 204 | ] |
| 205 | ] |
| 206 | "# |
| 207 | .to_string() |
| 208 | } |