MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/gandiva/cache_test.cc:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37TEST(TestCache, TestGetPut) {
38 Cache<TestCacheKey, std::shared_ptr<std::string>> cache(2);
39 auto hello = std::make_shared<std::string>("hello");
40 cache.PutObjectCode(TestCacheKey(1), hello);
41 auto world = std::make_shared<std::string>("world");
42 cache.PutObjectCode(TestCacheKey(2), world);
43 ASSERT_EQ(cache.GetObjectCode(TestCacheKey(1)), hello);
44 ASSERT_EQ(cache.GetObjectCode(TestCacheKey(2)), world);
45}
46
47namespace {
48constexpr auto cache_capacity_env_var = "GANDIVA_CACHE_SIZE";

Callers

nothing calls this directly

Calls 6

GetCacheCapacityFunction · 0.85
to_stringFunction · 0.85
PutObjectCodeMethod · 0.80
GetObjectCodeMethod · 0.80
TestCacheKeyClass · 0.70

Tested by

no test coverage detected