diff --git a/test/testother.cpp b/test/testother.cpp index 5bca204c3..0f9083f7e 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -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() {