| 105 | } |
| 106 | |
| 107 | void ExampleErrorHandling() { |
| 108 | namespace ffi = tvm::ffi; |
| 109 | try { |
| 110 | FuncThrowError(); |
| 111 | } catch (const ffi::Error& e) { |
| 112 | EXPECT_EQ(e.kind(), "TypeError"); |
| 113 | EXPECT_EQ(e.message(), "test0"); |
| 114 | std::cout << e.TracebackMostRecentCallLast() << std::endl; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | TEST(Example, Function) { |
| 119 | ExampleFunctionFromPacked(); |
no test coverage detected