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

Function TEST

tests/cpp/test_reflection.cc:85–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85TEST(Reflection, GetFieldByteOffset) {
86 EXPECT_EQ(reflection::GetFieldByteOffsetToObject(&TestObjA::x), sizeof(TVMFFIObject));
87 EXPECT_EQ(reflection::GetFieldByteOffsetToObject(&TestObjA::y), 8 + sizeof(TVMFFIObject));
88 EXPECT_EQ(reflection::GetFieldByteOffsetToObject(&TIntObj::value), sizeof(TVMFFIObject));
89}
90
91TEST(Reflection, FieldGetter) {
92 ObjectRef a = TInt(10);

Callers

nothing calls this directly

Calls 15

TFloatClass · 0.85
GetFieldInfoFunction · 0.85
CopyFromTVMFFIAnyFunction · 0.85
GetMethodInfoFunction · 0.85
GetMethodFunction · 0.85
TPrimExprClass · 0.85
GetInitAttrFunction · 0.85
TVMFFIGetTypeInfoFunction · 0.85
ForEachFieldInfoFunction · 0.85
TVMFFIGetTypeAttrColumnFunction · 0.85
initClass · 0.85

Tested by

no test coverage detected