Changeset View
Changeset View
Standalone View
Standalone View
plugins/clang/tests/test_assistants.cpp
Show First 20 Lines • Show All 478 Lines • ▼ Show 20 Line(s) | 381 | { | |||
---|---|---|---|---|---|
479 | // see https://bugs.kde.org/show_bug.cgi?id=355356 | 479 | // see https://bugs.kde.org/show_bug.cgi?id=355356 | ||
480 | QTest::newRow("no_retval_on_ctor") | 480 | QTest::newRow("no_retval_on_ctor") | ||
481 | << "class Foo { Foo(); };" | 481 | << "class Foo { Foo(); };" | ||
482 | << "Foo::Foo()\n{}" | 482 | << "Foo::Foo()\n{}" | ||
483 | << (QList<StateChange>() << StateChange(Testbed::HeaderDoc, Range(0, 16, 0, 16), QStringLiteral("char c"), SHOULD_ASSIST)) | 483 | << (QList<StateChange>() << StateChange(Testbed::HeaderDoc, Range(0, 16, 0, 16), QStringLiteral("char c"), SHOULD_ASSIST)) | ||
484 | << "class Foo { Foo(char c); };" | 484 | << "class Foo { Foo(char c); };" | ||
485 | << "Foo::Foo(char c)\n{}"; | 485 | << "Foo::Foo(char c)\n{}"; | ||
486 | 486 | | |||
487 | // see https://bugs.kde.org/show_bug.cgi?id=365420 | ||||
488 | QTest::newRow("no_retval_on_ctor_while_editing_definition") | ||||
489 | << "class Foo {\nFoo(int a); \n};" | ||||
490 | << "Foo::Foo(int a)\n{}" | ||||
491 | << (QList<StateChange>() << StateChange(Testbed::CppDoc, Range(0,13,0,14), QStringLiteral("b"), SHOULD_ASSIST)) | ||||
492 | << "class Foo {\nFoo(int b); \n};" | ||||
493 | << "Foo::Foo(int b)\n{}"; | ||||
494 | | ||||
487 | // see https://bugs.kde.org/show_bug.cgi?id=298511 | 495 | // see https://bugs.kde.org/show_bug.cgi?id=298511 | ||
488 | QTest::newRow("change_return_type_header") | 496 | QTest::newRow("change_return_type_header") | ||
489 | << "struct Foo { int bar(); };" | 497 | << "struct Foo { int bar(); };" | ||
490 | << "int Foo::bar()\n{}" | 498 | << "int Foo::bar()\n{}" | ||
491 | << (QList<StateChange>() << StateChange(Testbed::HeaderDoc, Range(0, 13, 0, 16), QStringLiteral("char"), SHOULD_ASSIST)) | 499 | << (QList<StateChange>() << StateChange(Testbed::HeaderDoc, Range(0, 13, 0, 16), QStringLiteral("char"), SHOULD_ASSIST)) | ||
492 | << "struct Foo { char bar(); };" | 500 | << "struct Foo { char bar(); };" | ||
493 | << "char Foo::bar()\n{}"; | 501 | << "char Foo::bar()\n{}"; | ||
494 | QTest::newRow("change_return_type_impl") | 502 | QTest::newRow("change_return_type_impl") | ||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |