MCPcopy Create free account
hub / github.com/apache/tvm-ffi / ExampleObjectRefAny

Function ExampleObjectRefAny

tests/cpp/test_example.cc:275–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275void ExampleObjectRefAny() {
276 namespace ffi = tvm::ffi;
277 MyIntPair pair(100, 200);
278 ffi::Any any = pair;
279 MyIntPair pair2 = any.cast<MyIntPair>();
280 EXPECT_EQ(pair2->a, 100);
281 EXPECT_EQ(pair2->b, 200);
282}
283
284TEST(Example, ObjectPtr) {
285 ExampleObjectPtr();

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected