From 67e9ed929471a12141217291964c6269f864d73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 2 Aug 2015 18:56:26 +0200 Subject: [PATCH] ZeroDiv: Avoid constant folding in testcases --- test/testother.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testother.cpp b/test/testother.cpp index 6319271c0..438dbfa28 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -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());