Skip to content

Commit 78c28f5

Browse files
authored
Merge pull request #920 from ahoppen/ahoppen/more-test-migration
Migrate the remaining TIBS tests to the new testing infrastructure that defines sources inline
2 parents d043dc0 + 996df8c commit 78c28f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1272
-1016
lines changed

Sources/LanguageServerProtocol/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ add_library(LanguageServerProtocol STATIC
2727
Notifications/WorkDoneProgress.swift
2828

2929
Requests/ApplyEditRequest.swift
30+
Requests/BarrierRequest.swift
3031
Requests/CallHierarchyIncomingCallsRequest.swift
3132
Requests/CallHierarchyOutgoingCallsRequest.swift
3233
Requests/CallHierarchyPrepareRequest.swift

Sources/LanguageServerProtocol/Messages.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/// `MessageRegistry._register()` which allows you to avoid bloating the real server implementation.
1818
public let builtinRequests: [_RequestType.Type] = [
1919
ApplyEditRequest.self,
20+
BarrierRequest.self,
2021
CallHierarchyIncomingCallsRequest.self,
2122
CallHierarchyOutgoingCallsRequest.self,
2223
CallHierarchyPrepareRequest.self,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
/// A no-op request that ensures all previous notifications and requests have been handled before any message
14+
/// after the barrier request is handled.
15+
public struct BarrierRequest: RequestType {
16+
public static var method: String = "workspace/_barrier"
17+
public typealias Response = VoidResponse
18+
19+
public init() {}
20+
}

Sources/LanguageServerProtocol/SupportTypes/Location.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/// Range within a particular document.
1414
///
1515
/// For a location where the document is implied, use `Position` or `Range<Position>`.
16-
public struct Location: ResponseType, Hashable, Codable {
16+
public struct Location: ResponseType, Hashable, Codable, CustomDebugStringConvertible {
1717

1818
public var uri: DocumentURI
1919

@@ -24,4 +24,8 @@ public struct Location: ResponseType, Hashable, Codable {
2424
self.uri = uri
2525
self._range = CustomCodable<PositionRange>(wrappedValue: range)
2626
}
27+
28+
public var debugDescription: String {
29+
return "\(uri):\(range.lowerBound)-\(range.upperBound)"
30+
}
2731
}

Sources/SKTestSupport/INPUTS/ClangModules/ClangModuleA.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

Sources/SKTestSupport/INPUTS/ClangModules/ClangModules_main.m

Lines changed: 0 additions & 6 deletions
This file was deleted.

Sources/SKTestSupport/INPUTS/ClangModules/module.modulemap

Lines changed: 0 additions & 3 deletions
This file was deleted.

Sources/SKTestSupport/INPUTS/ClangModules/project.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

Sources/SKTestSupport/INPUTS/ClangStdHeaderCanary/project.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

Sources/SKTestSupport/INPUTS/ClangStdHeaderCanary/std_header_canary.cpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)