File tree 1 file changed +56
-0
lines changed
Tests/PackageLoadingTests
1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // This source file is part of the Swift open source project
4
+ //
5
+ // Copyright (c) 2023-2025 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See http://swift.org/LICENSE.txt for license information
9
+ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ //===----------------------------------------------------------------------===//
12
+
13
+ import _InternalTestSupport
14
+ import Basics
15
+ import PackageModel
16
+ import SourceControl
17
+ import XCTest
18
+
19
+ final class PackageDescription6_2LoadingTests : PackageDescriptionLoadingTests {
20
+ override var toolsVersion : ToolsVersion {
21
+ . v6_2
22
+ }
23
+
24
+ func testDefaultIsolationPerTarget( ) async throws {
25
+ let content = """
26
+ import PackageDescription
27
+ let package = Package(
28
+ name: " Foo " ,
29
+ defaultLocalization: " be " ,
30
+ products: [],
31
+ targets: [
32
+ .target(
33
+ name: " Foo " ,
34
+ swiftSettings: [
35
+ .defaultIsolation(nil)
36
+ ]
37
+ ),
38
+ .target(
39
+ name: " Bar " ,
40
+ swiftSettings: [
41
+ .defaultIsolation(MainActor.self)
42
+ ]
43
+ )
44
+ ]
45
+ )
46
+ """
47
+
48
+ let observability = ObservabilitySystem . makeForTesting ( )
49
+ let ( _, validationDiagnostics) = try await loadAndValidateManifest (
50
+ content,
51
+ observabilityScope: observability. topScope
52
+ )
53
+ XCTAssertNoDiagnostics ( validationDiagnostics)
54
+ XCTAssertNoDiagnostics ( observability. diagnostics)
55
+ }
56
+ }
You can’t perform that action at this time.
0 commit comments