File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ // REQUIRES: VENDOR=apple
2
+
3
+ // RUN: %empty-directory(%t.mod)
4
+ // RUN: %empty-directory(%t.sdk)
5
+ // RUN: %empty-directory(%t.module-cache)
6
+
7
+ // RUN: echo "public func foo() {}" > %t.swift
8
+
9
+ // RUN: %target-swift-frontend -emit-module -emit-module-interface-path %t.mod/cake.swiftinterface %t.swift %clang-importer-sdk-nosource -parse-as-library -enable-library-evolution -disable-objc-attr-requires-foundation-module -module-cache-path %t.module-cache -emit-module-path %t.mod/cake.swiftmodule -module-name cake -swift-version 5
10
+
11
+ // Step 1: we should be able to load if we prefer cake.swiftinterface
12
+ // RUN: %api-digester -dump-sdk -print-module -module cake -I %t.mod -sdk %clang-importer-sdk-path -module-cache-path %t.module-cache -o %t.json -abi -abort-on-module-fail -use-interface-for-module cake
13
+
14
+ // RUN: echo "Swift Syntax Error" >> %t.mod/cake.swiftinterface
15
+
16
+ // Step 2: we shouldn't be able to load if we prefer cake.swiftinterface and cake.swiftinterface is broken
17
+ // RUN: not %api-digester -dump-sdk -print-module -module cake -I %t.mod -sdk %clang-importer-sdk-path -module-cache-path %t.module-cache -o %t.json -abi -abort-on-module-fail -use-interface-for-module cake
18
+
19
+ // Step 3: we should be able to load if we don't prefer cake.swiftinterface
20
+ // RUN: %api-digester -dump-sdk -print-module -module cake -I %t.mod -sdk %clang-importer-sdk-path -module-cache-path %t.module-cache -o %t.json -abi -abort-on-module-fail
You can’t perform that action at this time.
0 commit comments