forked from qt-creator/qt-creator
Clang: Move completion test
Change-Id: I61cd72c131407415732ed1231a4614be57c1454b Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
using namespace ClangBackEnd;
|
||||
|
||||
using testing::_;
|
||||
using testing::Eq;
|
||||
using testing::Property;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -70,6 +72,21 @@ TEST_F(CompleteCodeJob, SendAnnotations)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(CompleteCodeJob, ForwardTicketNumber)
|
||||
{
|
||||
jobRequest.ticketNumber = static_cast<quint64>(99);
|
||||
jobContextWithMockClient = JobContext(jobRequest, &documents, &unsavedFiles, &mockIpcClient);
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
EXPECT_CALL(mockIpcClient,
|
||||
codeCompleted(Property(&CodeCompletedMessage::ticketNumber, Eq(99))))
|
||||
.Times(1);
|
||||
|
||||
job.runAsync();
|
||||
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(CompleteCodeJob, DontSendCompletionsIfDocumentWasClosed)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
|
||||
Reference in New Issue
Block a user