Added TODO test case for unknown evaluation order

This commit is contained in:
Daniel Marjamäki 2015-12-25 17:48:15 +01:00
parent 90a54b1fae
commit 07b929e13f
1 changed files with 13 additions and 4 deletions

View File

@ -6113,10 +6113,19 @@ private:
ASSERT_EQUALS("[test.cpp:2]: (error) Expression '++exp,(char**)&exp' depends on order of evaluation of side effects\n", errout.str());
// sequence points
check("void f(int id) {\n"
" id = dostuff(id += 42);\n"
"}");
ASSERT_EQUALS("", errout.str());
{
// FP
check("void f(int id) {\n"
" id = dostuff(id += 42);\n"
"}");
ASSERT_EQUALS("", errout.str());
// FN
check("void f(int id) {\n"
" id = id + dostuff(id += 42);\n"
"}");
TODO_ASSERT_EQUALS("error", "", errout.str());
}
}
};