mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
The new approach has a few advantages over the olde TIBS-based approach: 1. The source file being tested is defined within the test case itself and not in a separate file, which makes it easier to understand the test case since the auxiliaury file doesn’t need to be opened. Finding it inside `Sources/SKTestSupport/INPUTS` is already hard for people that are not familiar with the codebase. 2. The build setup is significantly simpler since it doesn’t rely on `ninja`. It is thus easier to understand what is run during the test. 3. We can use the emoji location markers to refer to test locations, like we do for files that are opened using `TestSourceKitLSPClient.openDocument`. This commit only migrates call hierarchy testing to the new design. If we like it, I’ll migrate the other test workspaces as well.
24 lines
933 B
Swift
24 lines
933 B
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// Poll the index for unit changes and wait for them to be registered.
|
|
/// **LSP Extension, For Testing**.
|
|
///
|
|
/// Users of PollIndex should set `"initializationOptions": { "listenToUnitEvents": false }` during
|
|
/// the `initialize` request.
|
|
public struct PollIndexRequest: RequestType {
|
|
public static var method: String = "workspace/_pollIndex"
|
|
public typealias Response = VoidResponse
|
|
|
|
public init() {}
|
|
}
|