Commit 5ef4d341 authored by ussrhero's avatar ussrhero

added test for bug reproduction with sizeof

parent 809848cf
......@@ -215,6 +215,17 @@ TEST(ExprEval, Sizeof)
EXPECT_THROW(evalExpr(L"sizeof int"), DbgException);
}
TEST(ExprEval, SizeofComplex)
{
EXPECT_EQ(sizeof(int*[10]), evalExpr("sizeof(int*[10])"));
EXPECT_EQ(sizeof(int(*)[10]), evalExpr("sizeof(int(*)[10])"));
EXPECT_EQ(sizeof(int(&)[10]), evalExpr("sizeof(int(&)[10])"));
EXPECT_EQ(sizeof(int((*)[1])[10]), evalExpr("sizeof(int((*)[1])[10])"));
EXPECT_THROW(evalExpr("sizeof(int([1](*))[10])"), DbgException);
EXPECT_THROW(evalExpr("sizeof(int[10]&)"), DbgException);
}
TEST(ExprEval, Bool)
{
EXPECT_EQ(true, evalExpr(L"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