Branch Coverage

src/panda/cast.h
Criterion Covered Total %
branch 9 22 40.9


line true false branch
16 1 0 if (!map) {
17 1 0 thread_local DynCastCacheMap _map;
32 0 1 if (!obj) return NULL;
34 1 0 intptr_t key = (intptr_t)typeid(*obj).name();
37 1 0 DynCastCacheMap::iterator it = map.find(key);
38 0 1 if (it != map.end())
39 0 0 return it->second != INCORRECT_PTRDIFF ? reinterpret_cast((char*)obj - it->second) : NULL;
40 0 1 DERIVED* ret = dynamic_cast(obj);
41 1 0 if (ret) map[key] = (char*)obj - (char*)ret;
1 0 if (ret) map[key] = (char*)obj - (char*)ret;
42 0 0 else map[key] = INCORRECT_PTRDIFF;