()
| 21 | |
| 22 | |
| 23 | def test_string() -> None: |
| 24 | fecho = tvm_ffi.get_global_func("testing.echo") |
| 25 | s = tvm_ffi.core.String("hello") |
| 26 | s2 = fecho(s) |
| 27 | assert s2 == "hello" |
| 28 | s3 = tvm_ffi.convert("hello") |
| 29 | assert isinstance(s3, str) |
| 30 | |
| 31 | x = "hello long string" |
| 32 | assert fecho(x) == x |
| 33 | |
| 34 | s4 = pickle.loads(pickle.dumps(s)) |
| 35 | assert s4 == "hello" |
| 36 | |
| 37 | |
| 38 | def test_bytes() -> None: |