File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -540,4 +540,9 @@ final class AttributeTests: XCTestCase {
540
540
AssertParse ( " func takeRepeater(_ f: @MainActor @Sendable @escaping () -> Int) {} " )
541
541
AssertParse ( " takeRepesater { @MainActor @Sendable () -> Int in 0 } " )
542
542
}
543
+
544
+ func testPackageAttribute( ) {
545
+ AssertParse ( #"@_package(path: "../my-package") import A"# )
546
+ AssertParse ( #"@_package(url: "https://example.com/package.git", from: "0.0.1") @_exported import A"# )
547
+ }
543
548
}
Original file line number Diff line number Diff line change @@ -26,4 +26,15 @@ final class ImportTests: XCTestCase {
26
26
27
27
AssertBuildResult ( importDecl, " ␣import SwiftSyntax " )
28
28
}
29
+
30
+ func testPackageAttribute( ) {
31
+ let builder = ImportDeclSyntax ( """
32
+ @_package(url: " https://github.com/apple/swift-log.git " , " 1.0.0 " ..< " 2.0.0 " )
33
+ import Logging
34
+ """ )
35
+ AssertBuildResult ( builder, """
36
+ @_package(url: " https://github.com/apple/swift-log.git " , " 1.0.0 " ..< " 2.0.0 " )
37
+ import Logging
38
+ """ )
39
+ }
29
40
}
You can’t perform that action at this time.
0 commit comments