Skip to content

Commit ce9e536

Browse files
committed
Format
1 parent 58c5d38 commit ce9e536

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

test/testother.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4670,21 +4670,21 @@ class TestOther : public TestFixture {
46704670
"struct S { fp_t m_fp; };\n"
46714671
"void g(fp_t);\n"
46724672
"S f(S* s) {\n"
4673-
" g_fp = [](int* p) { return *p; };\n"
4674-
" s->m_fp = [](int* p) { return *p; };\n"
4673+
" g_fp = [](int* p) { return *p; };\n"
4674+
" s->m_fp = [](int* p) { return *p; };\n"
46754675
" g([](int* p) { return *p; });\n"
46764676
" auto x = [](int* p) { return *p; };\n"
4677-
" g(x);\n"
4677+
" g(x);\n"
46784678
" return { [](int* p) { return *p; } };\n"
46794679
"}\n");
46804680
ASSERT_EQUALS("", errout_str());
46814681

4682-
check("void f() {\n"
4683-
" int i = 0;\n"
4684-
" auto x = [&]() { int* p = &i; if (*p) {} };\n"
4685-
" x();\n"
4686-
"}\n");
4687-
ASSERT_EQUALS("[test.cpp:3:27]: (style) Variable 'p' can be declared as pointer to const [constVariablePointer]\n", errout_str());
4682+
check("void f() {\n"
4683+
" int i = 0;\n"
4684+
" auto x = [&]() { int* p = &i; if (*p) {} };\n"
4685+
" x();\n"
4686+
"}\n");
4687+
ASSERT_EQUALS("[test.cpp:3:27]: (style) Variable 'p' can be declared as pointer to const [constVariablePointer]\n", errout_str());
46884688
}
46894689

46904690
void constArray() {

0 commit comments

Comments
 (0)