You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testcondition.cpp
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4065,7 +4065,7 @@ class TestCondition : public TestFixture {
4065
4065
" unsigned int num = max - 1;\n"
4066
4066
" if (num < 0) {}\n"// <- do not report knownConditionTrueFalse
4067
4067
"}");
4068
-
ASSERT_EQUALS("", errout_str());
4068
+
ASSERT_EQUALS("[test.cpp:3:15]: (style) Comparing expression of type 'unsigned int' against value 0. Condition is always false. [compareValueOutOfTypeRangeError]", errout_str());
4069
4069
4070
4070
// #10297
4071
4071
check("void foo(size_t len, int start) {\n"
@@ -6355,6 +6355,15 @@ class TestCondition : public TestFixture {
6355
6355
"}\n", settingsUnix64);
6356
6356
ASSERT_EQUALS("[test.cpp:2:14]: (style) Comparing expression of type 'bool' against value 2. Condition is always true. [compareValueOutOfTypeRangeError]\n",
ASSERT_EQUALS("[test.cpp:3:14]: (style) Comparing expression of type 'const unsigned int &' against value 4294967295. Condition is always true. [compareValueOutOfTypeRangeError]\n"
6365
+
"[test.cpp:4:13]: (style) Comparing expression of type 'const unsigned int &' against value 4294967295. Condition is always false. [compareValueOutOfTypeRangeError]\n",
0 commit comments