Add test for #9817 (#4388)

* Add test for #8919

* Add test for #9817

* Revert
This commit is contained in:
chrchr-github 2022-08-20 19:23:55 +02:00 committed by GitHub
parent 1d95d1908d
commit 5cc8ef7e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -4298,6 +4298,13 @@ private:
ASSERT_EQUALS("[test.cpp:3]: (style) Condition 'g()==1' is always false\n"
"[test.cpp:3]: (style) Condition 'g()==-1' is always true\n",
errout.str());
// #9817
check("void f(float x) {\n"
" if (x <= 0) {}\n"
" else if (x < 1) {}\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void alwaysTrueSymbolic()