ZeroDiv: Avoid constant folding in testcases

This commit is contained in:
Daniel Marjamäki 2015-08-02 18:56:26 +02:00
parent 8d3f7e36e9
commit 67e9ed9294
1 changed files with 3 additions and 3 deletions

View File

@ -421,9 +421,9 @@ private:
}
void zeroDiv11() {
check("void f() {\n"
" int res = (1+2)/0;\n"
" int res = (1*2)/0;\n"
check("void f(int a) {\n"
" int res = (a+2)/0;\n"
" int res = (a*2)/0;\n"
"}");
ASSERT_EQUALS("[test.cpp:2]: (error) Division by zero.\n"
"[test.cpp:3]: (error) Division by zero.\n", errout.str());