Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 14, 2023
1 parent 758a28e commit 976294a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/testclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class TestClass : public TestFixture {

TEST_CASE(override1);
TEST_CASE(overrideCVRefQualifiers);

TEST_CASE(uselessOverride);

TEST_CASE(thisUseAfterFree);
Expand Down Expand Up @@ -8346,16 +8346,16 @@ class TestClass : public TestFixture {

void uselessOverride() {
checkUselessOverride("struct B { virtual int f() { return 5; } };\n" // #11757
"struct D : B {\m"
"struct D : B {\n"
" int f() override { return B::f(); }\n"
"};");
ASSERT_EQUALS("[test.cpp:1] -> [test.cpp:2]: (style) The function 'f' overrides a function in a base class but just delegates back to the base class.\n", errout.str());
ASSERT_EQUALS("[test.cpp:1] -> [test.cpp:3]: (style) The function 'f' overrides a function in a base class but just delegates back to the base class.\n", errout.str());

checkUselessOverride("struct B { virtual void f(); };\n"
"struct D : B {\m"
"struct D : B {\n"
" void f() override { B::f(); }\n"
"};");
ASSERT_EQUALS("[test.cpp:1] -> [test.cpp:2]: (style) The function 'f' overrides a function in a base class but just delegates back to the base class.\n", errout.str());
ASSERT_EQUALS("[test.cpp:1] -> [test.cpp:3]: (style) The function 'f' overrides a function in a base class but just delegates back to the base class.\n", errout.str());

checkUselessOverride("struct B { virtual int f() = 0; };\n"
"int B::f() { return 5; }\n"
Expand Down

0 comments on commit 976294a

Please sign in to comment.