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

Function TEST

tests/cpp/test_map.cc:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29using namespace tvm::ffi::testing;
30
31TEST(Map, Basic) {
32 Map<TInt, int> map0;
33 TInt k0(0);
34 map0.Set(k0, 1);
35
36 EXPECT_EQ(map0.size(), 1);
37
38 map0.Set(k0, 2);
39 EXPECT_EQ(map0.size(), 1);
40
41 auto it = map0.find(k0);
42 EXPECT_TRUE(it != map0.end());
43 EXPECT_EQ((*it).second, 2);
44}
45
46TEST(Map, PODKey) {
47 Map<Any, Any> map0;

Callers

nothing calls this directly

Calls 15

SetMethod · 0.45
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
same_asMethod · 0.45
countMethod · 0.45
clearMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
use_countMethod · 0.45
kindMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected