astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-07-10 22:56:01 +02:00
parent 5f2dc0a036
commit 7e2858f158
1 changed files with 10 additions and 10 deletions

View File

@ -547,17 +547,17 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
{ {
check("void f(Class &c) {\n" check("void f(Class &c) {\n"
" if (c.dostuff() == 3) {}\n" " if (c.dostuff() == 3) {}\n"
" else { if (c.dostuff() == 3) {} }\n" " else { if (c.dostuff() == 3) {} }\n"
"}"); "}");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
check("void f(const Class &c) {\n" check("void f(const Class &c) {\n"
" if (c.dostuff() == 3) {}\n" " if (c.dostuff() == 3) {}\n"
" else { if (c.dostuff() == 3) {} }\n" " else { if (c.dostuff() == 3) {} }\n"
"}"); "}");
ASSERT_EQUALS("[test.cpp:3]: (style) Expression is always false because 'else if' condition matches previous condition at line 2.\n", errout.str()); ASSERT_EQUALS("[test.cpp:3]: (style) Expression is always false because 'else if' condition matches previous condition at line 2.\n", errout.str());
} }
check("void f(int a, int &b) {\n" check("void f(int a, int &b) {\n"