| 395 | |
| 396 | def test_function_with_value_protocol() -> None: |
| 397 | class ValueProtocol: |
| 398 | def __init__(self, value: Any) -> None: |
| 399 | self.value = value |
| 400 | |
| 401 | def __tvm_ffi_value__(self) -> Any: |
| 402 | return self.value |
| 403 | |
| 404 | fecho = tvm_ffi.get_global_func("testing.echo") |
| 405 | assert fecho(ValueProtocol(10)) == 10 |
no outgoing calls