From b143f4a3ac1ab9959b64ca4f31aadb5b75a3237b Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar <nikolai.kosjar@digia.com> Date: Thu, 8 Aug 2013 12:07:40 +0200 Subject: [PATCH] CppEditor: Mark a test case as expected to fail. Contributor works on a fix. Change-Id: I998558b53b6506bcb1398cd2cd783b748b358240 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> --- .../cppeditor/followsymbol_switchmethoddecldef_test.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 3bdea36e29a..8d69042692a 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -143,7 +143,7 @@ public: TestCase(CppEditorAction action, const QList<TestDocumentPtr> theTestFiles); ~TestCase(); - void run(); + void run(bool expectedFail = false); private: TestCase(const TestCase &); @@ -278,7 +278,7 @@ TestDocumentPtr TestCase::testFileWithTargetCursorMarker() return TestDocumentPtr(); } -void TestCase::run() +void TestCase::run(bool expectedFail) { TestDocumentPtr initialTestFile = testFileWithInitialCursorMarker(); QVERIFY(initialTestFile); @@ -318,6 +318,8 @@ void TestCase::run() &expectedLine, &expectedColumn); // qDebug() << "Expected line:" << expectedLine; // qDebug() << "Expected column:" << expectedColumn; + if (expectedFail) + QEXPECT_FAIL("", "Contributor works on a fix.", Abort); QCOMPARE(currentTextEditor->currentLine(), expectedLine); QCOMPARE(currentTextEditor->currentColumn() - 1, expectedColumn); } @@ -583,7 +585,7 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_globalVarFromEnum() ; TestCase test(TestCase::FollowSymbolUnderCursor, source); - test.run(); + test.run(/*expectedFail =*/ true); } void CppEditorPlugin::test_FollowSymbolUnderCursor_selfInitialization() -- GitLab