Commit cccb3430 authored by ussrhero's avatar ussrhero
Browse files

added tests for inline functions

parent f969022c
......@@ -787,6 +787,11 @@ public:
m_symbol->getInlineSourceLine(offset, fileName, lineno);
}
size_t getSize() const override
{
NOT_IMPLEMENTED();
}
private:
SymbolPtr m_symbol;
......
......@@ -343,11 +343,19 @@ TEST_P(InlineStackTest, InlineFunc)
EXPECT_EQ(0, func->getInlineFunctions(func->getDebugStart()).size());
EXPECT_EQ(2, func->getInlineFunctions(offset).size());
}
TEST_P(InlineStackTest, InlineFuncName)
{
auto func = loadTypedVar(L"stackTestRun1");
auto stack = getStack(true);
auto offset = stack->getFrame(2)->getIP();
EXPECT_EQ(L"stackTestClass::stackMethod", func->getInlineFunctions(offset).front()->getName());
EXPECT_EQ(L"Void(__thiscall stackTestClass::)(Double, Int4B)", func->getInlineFunctions(offset).front()->getType()->getName());
}
TEST_P(InlineStackTest, InlineFuncSource)
{
auto func = loadTypedVar(L"stackTestRun1");
......@@ -385,6 +393,18 @@ TEST_P(InlineStackTest, InlineStackGetSymbol)
EXPECT_NE(0, displacement);
}
TEST_P(InlineStackTest, InlineFuncAddress)
{
auto stack = getStack(true);
EXPECT_NE(0L, stack->getFrame(0)->getFunction()->getAddress());
}
TEST_P(InlineStackTest, DISABLED_InlineFuncSize)
{
auto stack = getStack(true);
EXPECT_NE(0L, stack->getFrame(0)->getFunction()->getSize());
}
TEST_P(InlineStackTest, InlineStackSourceLine)
{
auto stack = getStack(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment