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

Function TEST

tests/cpp/test_array.cc:31–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29using namespace tvm::ffi::testing;
30
31TEST(Array, Basic) {
32 Array<TInt> arr = {TInt(11), TInt(12)};
33 TInt v1 = arr[0];
34 EXPECT_EQ(v1->value, 11);
35 EXPECT_EQ(v1.use_count(), 2);
36 EXPECT_EQ(arr[1]->value, 12);
37}
38
39TEST(Array, COWSet) {
40 Array<TInt> arr = {TInt(11), TInt(12)};

Callers

nothing calls this directly

Calls 15

TFloatClass · 0.85
MutateByApplyMethod · 0.80
SetItemMethod · 0.80
TIntClass · 0.70
StringClass · 0.50
AnyClass · 0.50
use_countMethod · 0.45
SetMethod · 0.45
uniqueMethod · 0.45
getMethod · 0.45
MapMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected