TestOther: Added zeroDiv test to make sure there is not FN when there is cast

This commit is contained in:
Daniel Marjamäki 2015-07-26 22:23:37 +02:00
parent bf921251e9
commit 29fbbef001
1 changed files with 5 additions and 0 deletions

View File

@ -268,6 +268,11 @@ private:
" cout << 42 / (float)0;\n"
"}");
ASSERT_EQUALS("", errout.str());
check("void foo() {\n"
" cout << 42 / (int)0;\n"
"}");
ASSERT_EQUALS("[test.cpp:2]: (error) Division by zero.\n", errout.str());
}
void zeroDiv2() {