Skip to content

Commit b2df036

Browse files
Update testvalueflow.cpp
1 parent 10af431 commit b2df036

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/testvalueflow.cpp‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,6 +4326,13 @@ class TestValueFlow : public TestFixture {
43264326
"}\n";
43274327
auto values = tokenValues(code, "s :", ValueFlow::Value::ValueType::FLOAT);
43284328
ASSERT_EQUALS(0, values.size());
4329+
4330+
code = "bool f(unsigned a, unsigned b) {\n"
4331+
" unsigned m = a < b ? a : b;\n"
4332+
" bool x = (m > a);\n"
4333+
" return x;\n"
4334+
"}\n";
4335+
ASSERT_EQUALS(true, testValueOfX(code, 4U, 0));
43294336
}
43304337

43314338
void valueFlowForwardLambda() {

0 commit comments

Comments
 (0)