Skip to content

Commit

Permalink
Update testcondition.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored May 6, 2024
1 parent 92436fd commit bc575f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/testcondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5558,6 +5558,12 @@ class TestCondition : public TestFixture {
"}\n");
ASSERT_EQUALS("[test.cpp:4] -> [test.cpp:6]: (style) The if condition is the same as the previous if condition\n", errout_str());

check("void f(double d) {\n" // #12712
" if (std::isfinite(d)) {}\n"
" if (std::isfinite(d)) {}\n"
"}\n");
ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:3]: (style) The if condition is the same as the previous if condition\n", errout_str());

// do not crash
check("void assign(const MMA& other) {\n"
" if (mPA.cols != other.mPA.cols || mPA.rows != other.mPA.rows)\n"
Expand Down

0 comments on commit bc575f8

Please sign in to comment.